From f3ddb0a399b4a14fd32e671f6e07c78eb6f60b91 Mon Sep 17 00:00:00 2001 From: Neenu1995 Date: Tue, 10 Aug 2021 12:34:44 -0400 Subject: [PATCH] feat: initial generation --- .github/.OwlBot.lock.yaml | 3 + .github/.OwlBot.yaml | 32 + .github/CODEOWNERS | 10 + .github/ISSUE_TEMPLATE/bug_report.md | 51 + .github/ISSUE_TEMPLATE/feature_request.md | 21 + .github/ISSUE_TEMPLATE/support_request.md | 7 + .github/PULL_REQUEST_TEMPLATE.md | 7 + .github/blunderbuss.yml | 7 + .github/generated-files-bot.yml | 12 + .github/readme/synth.py | 19 + .github/release-please.yml | 3 + .github/snippet-bot.yml | 0 .github/sync-repo-settings.yaml | 48 + .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 | 37 + .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 | 91 + .kokoro/nightly/common.cfg | 25 + .kokoro/nightly/integration.cfg | 37 + .kokoro/nightly/java11.cfg | 7 + .kokoro/nightly/java7.cfg | 7 + .kokoro/nightly/java8-osx.cfg | 3 + .kokoro/nightly/java8-win.cfg | 3 + .kokoro/nightly/java8.cfg | 12 + .kokoro/nightly/samples.cfg | 38 + .kokoro/populate-secrets.sh | 43 + .kokoro/presubmit/clirr.cfg | 13 + .kokoro/presubmit/common.cfg | 34 + .kokoro/presubmit/dependencies.cfg | 12 + .kokoro/presubmit/integration.cfg | 33 + .kokoro/presubmit/java11.cfg | 7 + .kokoro/presubmit/java7.cfg | 7 + .kokoro/presubmit/java8-osx.cfg | 3 + .kokoro/presubmit/java8-win.cfg | 3 + .kokoro/presubmit/java8.cfg | 12 + .kokoro/presubmit/linkage-monitor.cfg | 12 + .kokoro/presubmit/lint.cfg | 13 + .kokoro/presubmit/samples.cfg | 33 + .kokoro/readme.sh | 45 + .kokoro/release/bump_snapshot.cfg | 53 + .kokoro/release/common.cfg | 49 + .kokoro/release/common.sh | 50 + .kokoro/release/drop.cfg | 6 + .kokoro/release/drop.sh | 32 + .kokoro/release/promote.cfg | 6 + .kokoro/release/promote.sh | 34 + .kokoro/release/publish_javadoc.cfg | 23 + .kokoro/release/publish_javadoc.sh | 53 + .kokoro/release/publish_javadoc11.cfg | 30 + .kokoro/release/publish_javadoc11.sh | 67 + .kokoro/release/snapshot.cfg | 6 + .kokoro/release/snapshot.sh | 33 + .kokoro/release/stage.cfg | 19 + .kokoro/release/stage.sh | 45 + .kokoro/trampoline.sh | 26 + .repo-metadata.json | 16 + CODE_OF_CONDUCT.md | 94 + CONTRIBUTING.md | 139 + LICENSE | 201 + README.md | 202 + SECURITY.md | 7 + codecov.yaml | 4 + google-cloud-storage-transfer-bom/pom.xml | 85 + google-cloud-storage-transfer/pom.xml | 111 + .../proto/StorageTransferServiceClient.java | 805 + .../proto/StorageTransferServiceSettings.java | 304 + .../v1/proto/gapic_metadata.json | 42 + .../v1/proto/package-info.java | 42 + ...StorageTransferServiceCallableFactory.java | 113 + .../stub/GrpcStorageTransferServiceStub.java | 459 + .../stub/StorageTransferServiceStub.java | 98 + .../StorageTransferServiceStubSettings.java | 625 + .../v1/proto/MockStorageTransferService.java | 59 + .../proto/MockStorageTransferServiceImpl.java | 236 + .../StorageTransferServiceClientTest.java | 492 + grpc-google-cloud-storage-transfer-v1/pom.xml | 69 + .../v1/proto/StorageTransferServiceGrpc.java | 1329 + java.header | 15 + license-checks.xml | 10 + owlbot.py | 24 + pom.xml | 188 + .../clirr-ignored-differences.xml | 5 + .../pom.xml | 46 + .../v1/proto/TransferProto.java | 9098 +++++ .../v1/proto/TransferTypes.java | 31789 ++++++++++++++++ .../google/storagetransfer/v1/transfer.proto | 243 + .../storagetransfer/v1/transfer_types.proto | 760 + renovate.json | 76 + samples/install-without-bom/pom.xml | 84 + samples/pom.xml | 56 + samples/snapshot/pom.xml | 83 + samples/snippets/pom.xml | 47 + versions.txt | 6 + 104 files changed, 49889 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 README.md create mode 100644 SECURITY.md create mode 100644 codecov.yaml create mode 100644 google-cloud-storage-transfer-bom/pom.xml create mode 100644 google-cloud-storage-transfer/pom.xml create mode 100644 google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/StorageTransferServiceClient.java create mode 100644 google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/StorageTransferServiceSettings.java create mode 100644 google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/gapic_metadata.json create mode 100644 google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/package-info.java create mode 100644 google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/GrpcStorageTransferServiceCallableFactory.java create mode 100644 google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/GrpcStorageTransferServiceStub.java create mode 100644 google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/StorageTransferServiceStub.java create mode 100644 google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/StorageTransferServiceStubSettings.java create mode 100644 google-cloud-storage-transfer/src/test/java/com/google/storagetransfer/v1/proto/MockStorageTransferService.java create mode 100644 google-cloud-storage-transfer/src/test/java/com/google/storagetransfer/v1/proto/MockStorageTransferServiceImpl.java create mode 100644 google-cloud-storage-transfer/src/test/java/com/google/storagetransfer/v1/proto/StorageTransferServiceClientTest.java create mode 100644 grpc-google-cloud-storage-transfer-v1/pom.xml create mode 100644 grpc-google-cloud-storage-transfer-v1/src/main/java/com/google/storagetransfer/v1/proto/StorageTransferServiceGrpc.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-storage-transfer-v1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-storage-transfer-v1/pom.xml create mode 100644 proto-google-cloud-storage-transfer-v1/src/main/java/com/google/storagetransfer/v1/proto/TransferProto.java create mode 100644 proto-google-cloud-storage-transfer-v1/src/main/java/com/google/storagetransfer/v1/proto/TransferTypes.java create mode 100644 proto-google-cloud-storage-transfer-v1/src/main/proto/google/storagetransfer/v1/transfer.proto create mode 100644 proto-google-cloud-storage-transfer-v1/src/main/proto/google/storagetransfer/v1/transfer_types.proto create mode 100644 renovate.json create mode 100644 samples/install-without-bom/pom.xml create mode 100644 samples/pom.xml create mode 100644 samples/snapshot/pom.xml create mode 100644 samples/snippets/pom.xml create mode 100644 versions.txt diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml new file mode 100644 index 0000000..dbc2f4a --- /dev/null +++ b/.github/.OwlBot.lock.yaml @@ -0,0 +1,3 @@ +docker: + digest: sha256:12cbdc4f137152a1a8b83f50ebc1a4098be0d3baff78b46efaec306f7cfafd13 + image: gcr.io/repo-automation-bots/owlbot-java:latest \ No newline at end of file diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml new file mode 100644 index 0000000..5078ea0 --- /dev/null +++ b/.github/.OwlBot.yaml @@ -0,0 +1,32 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +docker: + image: "gcr.io/repo-automation-bots/owlbot-java:latest" + +deep-remove-regex: +- "/grpc-google-.*/src" +- "/proto-google-.*/src" +- "/google-.*/src" + +deep-preserve-regex: +- "/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java" + +deep-copy-regex: +- source: "/google/storagetransfer/(v.*)/.*-java/proto-google-.*/src" + dest: "/owl-bot-staging/$1/proto-google-cloud-storage-transfer-$1/src" +- source: "/google/storagetransfer/(v.*)/.*-java/grpc-google-.*/src" + dest: "/owl-bot-staging/$1/grpc-google-cloud-storage-transfer-$1/src" +- source: "/google/storagetransfer/(v.*)/.*-java/gapic-google-.*/src" + dest: "/owl-bot-staging/$1/google-cloud-storage-transfer/src" \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..30fdb7b --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,10 @@ +# Code owners file. +# This file controls who is tagged for review for any given pull request. + +# For syntax help see: +# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax + +* @googleapis/yoshi-java + +# The java-samples-reviewers team is the default owner for samples changes +samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..34361e2 --- /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-storage-transfer/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. storage-transfer version(s): + +#### Steps to reproduce + + 1. ? + 2. ? + +#### Code example + +```java +// example +``` + +#### Stack trace +``` +Any relevant stacktrace here. +``` + +#### External references such as API reference guides + +- ? + +#### Any additional information below + + +Following these steps guarantees the quickest resolution possible. + +Thanks! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..754e30c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +**Is your feature request related to a problem? Please describe.** +What the problem is. Example: I'm always frustrated when [...] + +**Describe the solution you'd like** +What you want to happen. + +**Describe alternatives you've considered** +Any alternative solutions or features you've considered. + +**Additional context** +Any other context or screenshots about the feature request. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 0000000..9958690 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_request.md @@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..f38979e --- /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-storage-transfer/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # ☕️ diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 0000000..1a23ea4 --- /dev/null +++ b/.github/blunderbuss.yml @@ -0,0 +1,7 @@ +# Configuration for the Blunderbuss GitHub app. For more info see +# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +assign_prs_by: +- labels: + - samples + to: + - googleapis/java-samples-reviewers \ No newline at end of file diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml new file mode 100644 index 0000000..c644a24 --- /dev/null +++ b/.github/generated-files-bot.yml @@ -0,0 +1,12 @@ +externalManifests: +- type: json + file: 'synth.metadata' + jsonpath: '$.generatedFiles[*]' +- type: json + file: '.github/readme/synth.metadata/synth.metadata' + jsonpath: '$.generatedFiles[*]' +ignoreAuthors: +- 'renovate-bot' +- 'yoshi-automation' +- 'release-please[bot]' +- 'gcf-owl-bot[bot]' diff --git a/.github/readme/synth.py b/.github/readme/synth.py new file mode 100644 index 0000000..7b48cc2 --- /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 0000000..8ca7f9c --- /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 0000000..e69de29 diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 0000000..15faacd --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,48 @@ + +# Whether or not rebase-merging is enabled on this repository. +# Defaults to `true` +rebaseMergeAllowed: false + +# Whether or not squash-merging is enabled on this repository. +# Defaults to `true` +squashMergeAllowed: true + +# Whether or not PRs are merged with a merge commit on this repository. +# Defaults to `false` +mergeCommitAllowed: false + +# Rules for 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 (8)" + - "units (11)" + - "Kokoro - Test: Integration" + - "cla/google" +# List of explicit permissions to add (additive only) +permissionRules: +- team: yoshi-admins + permission: admin +- team: yoshi-java-admins + permission: admin +- team: yoshi-java + permission: push diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml new file mode 100644 index 0000000..f247d5c --- /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 0000000..7513aca --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -0,0 +1,54 @@ +on: + pull_request: +name: auto-merge-readme +jobs: + approve: + runs-on: ubuntu-latest + if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' + steps: + - uses: actions/github-script@v3 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + script: | + // only approve PRs from yoshi-automation + if (context.payload.pull_request.user.login !== "yoshi-automation") { + return; + } + + // only approve PRs like "chore: release " + if (!context.payload.pull_request.title === "chore: regenerate README") { + return; + } + + // only approve PRs with README.md and synth.metadata changes + const files = new Set( + ( + await github.paginate( + github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }) + ) + ).map(file => file.filename) + ); + if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) { + return; + } + + // approve README regeneration PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped PR!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach automerge label + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['automerge'] + }); diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml new file mode 100644 index 0000000..9b4fd4d --- /dev/null +++ b/.github/workflows/auto-release.yaml @@ -0,0 +1,88 @@ +on: + pull_request: +name: auto-release +jobs: + approve: + runs-on: ubuntu-latest + if: contains(github.head_ref, 'release-please') + steps: + - uses: actions/github-script@v3 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + debug: true + script: | + // only approve PRs from release-please[bot] + if (context.payload.pull_request.user.login !== "release-please[bot]") { + return; + } + + // only approve PRs like "chore: release " + if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + return; + } + + // only approve PRs with pom.xml and versions.txt changes + const filesPromise = github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const changed_files = await github.paginate(filesPromise) + + if ( changed_files.length < 1 ) { + console.log( "Not proceeding since PR is empty!" ) + return; + } + + if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { + console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) + return; + } + + // trigger auto-release when + // 1) it is a SNAPSHOT release (auto-generated post regular release) + // 2) there are dependency updates only + // 3) there are no open dependency update PRs in this repo (to avoid multiple releases) + if ( + context.payload.pull_request.body.includes("Fix") || + context.payload.pull_request.body.includes("Build") || + context.payload.pull_request.body.includes("Documentation") || + context.payload.pull_request.body.includes("BREAKING CHANGES") || + context.payload.pull_request.body.includes("Features") + ) { + console.log( "Not auto-releasing since it is not a dependency-update-only release." ); + return; + } + + const promise = github.pulls.list.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open' + }); + const open_pulls = await github.paginate(promise) + + if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) { + for ( const pull of open_pulls ) { + if ( pull.title.startsWith("deps: update dependency") ) { + console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." ); + return; + } + } + } + + // approve release PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped release!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach kokoro:force-run and automerge labels + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['kokoro:force-run', 'automerge'] + }); diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..65ae6ec --- /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: [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 0000000..c46230a --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,14 @@ +on: + pull_request: +name: samples +jobs: + checkstyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Run checkstyle + run: mvn -P lint --quiet --batch-mode checkstyle:check + working-directory: samples/snippets diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..069d08f --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# Maven +target/ + +# Eclipse +.classpath +.project +.settings + +# Intellij +*.iml +.idea/ + +# python utilities +*.pyc +__pycache__ + +.flattened-pom.xml diff --git a/.kokoro/build.bat b/.kokoro/build.bat new file mode 100644 index 0000000..05826ad --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +1,3 @@ +:: See documentation in type-shell-output.bat + +"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 0000000..659465c --- /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-storage-transfer +fi + +echo "exiting with ${RETURN_CODE}" +exit ${RETURN_CODE} diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh new file mode 100755 index 0000000..46edbf7 --- /dev/null +++ b/.kokoro/coerce_logs.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script finds and moves sponge logs so that they can be found by placer +# and are not flagged as flaky by sponge. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +job=$(basename ${KOKORO_JOB_NAME}) + +echo "coercing sponge logs..." +for xml in `find . -name *-sponge_log.xml` +do + class=$(basename ${xml} | cut -d- -f2) + dir=$(dirname ${xml})/${job}/${class} + text=$(dirname ${xml})/${class}-sponge_log.txt + mkdir -p ${dir} + mv ${xml} ${dir}/sponge_log.xml + mv ${text} ${dir}/sponge_log.txt +done diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg new file mode 100644 index 0000000..d6f6153 --- /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-storage-transfer/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-storage-transfer/.kokoro/build.sh" +} diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 0000000..ace89f4 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +function retry_with_backoff { + attempts_left=$1 + sleep_seconds=$2 + shift 2 + command=$@ + + + # store current flag state + flags=$- + + # allow a failures to continue + set +e + ${command} + exit_code=$? + + # restore "e" flag + if [[ ${flags} =~ e ]] + then set -e + else set +e + fi + + if [[ $exit_code == 0 ]] + then + return 0 + fi + + # failure + if [[ ${attempts_left} > 0 ]] + then + echo "failure (${exit_code}), sleeping ${sleep_seconds}..." + sleep ${sleep_seconds} + new_attempts=$((${attempts_left} - 1)) + new_sleep=$((${sleep_seconds} * 2)) + retry_with_backoff ${new_attempts} ${new_sleep} ${command} + fi + + return $exit_code +} + +## Helper functionss +function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } +function msg() { println "$*" >&2; } +function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg new file mode 100644 index 0000000..ad254f7 --- /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-storage-transfer/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-storage-transfer/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg new file mode 100644 index 0000000..495cc7b --- /dev/null +++ b/.kokoro/continuous/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg new file mode 100644 index 0000000..f80d243 --- /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-storage-transfer/.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 0000000..9030ba8 --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,91 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail +shopt -s nullglob + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh + +# Print out Java +java -version +echo $JOB_TYPE + +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" + +# this should run maven enforcer +retry_with_backoff 3 10 \ + mvn install -B -V -ntp \ + -DskipTests=true \ + -Dmaven.javadoc.skip=true \ + -Dclirr.skip=true + +mvn -B dependency:analyze -DfailOnWarning=true + +echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" +## Run dependency list completeness check +function completenessCheck() { + # Output dep list with compile scope generated using the original pom + # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. + # This is stripped from the output as it is not present in the flattened pom. + # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. + msg "Generating dependency list using original pom..." + mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt + + # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) + msg "Generating dependency list using flattened pom..." + mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt + + # Compare two dependency lists + msg "Comparing dependency lists..." + diff .org-list.txt .new-list.txt >.diff.txt + if [[ $? == 0 ]] + then + msg "Success. No diff!" + else + msg "Diff found. See below: " + msg "You can also check .diff.txt file located in $1." + cat .diff.txt + return 1 + fi +} + +# Allow failures to continue running the script +set +e + +error_count=0 +for path in **/.flattened-pom.xml +do + # Check flattened pom in each dir that contains it for completeness + dir=$(dirname "$path") + pushd "$dir" + completenessCheck "$dir" + error_count=$(($error_count + $?)) + popd +done + +if [[ $error_count == 0 ]] +then + msg "All checks passed." + exit 0 +else + msg "Errors found. See log statements above." + exit 1 +fi diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg new file mode 100644 index 0000000..ad254f7 --- /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-storage-transfer/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-storage-transfer/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg new file mode 100644 index 0000000..0048c8e --- /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 0000000..709f2b4 --- /dev/null +++ b/.kokoro/nightly/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg new file mode 100644 index 0000000..cb24f44 --- /dev/null +++ b/.kokoro/nightly/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg new file mode 100644 index 0000000..c9b62e3 --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-storage-transfer/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 0000000..ab0e966 --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-storage-transfer/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg new file mode 100644 index 0000000..495cc7b --- /dev/null +++ b/.kokoro/nightly/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg new file mode 100644 index 0000000..f254293 --- /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 0000000..f525142 --- /dev/null +++ b/.kokoro/populate-secrets.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright 2020 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} +function msg { println "$*" >&2 ;} +function println { printf '%s\n' "$(now) $*" ;} + + +# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: +# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com +SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" +msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" +mkdir -p ${SECRET_LOCATION} +for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") +do + msg "Retrieving secret ${key}" + docker run --entrypoint=gcloud \ + --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ + gcr.io/google.com/cloudsdktool/cloud-sdk \ + secrets versions access latest \ + --project cloud-devrel-kokoro-resources \ + --secret ${key} > \ + "${SECRET_LOCATION}/${key}" + if [[ $? == 0 ]]; then + msg "Secret written to ${SECRET_LOCATION}/${key}" + else + msg "Error retrieving secret ${key}" + fi +done diff --git a/.kokoro/presubmit/clirr.cfg b/.kokoro/presubmit/clirr.cfg new file mode 100644 index 0000000..ec57244 --- /dev/null +++ b/.kokoro/presubmit/clirr.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "clirr" +} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg new file mode 100644 index 0000000..f8bbdbd --- /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-storage-transfer/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-storage-transfer/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg new file mode 100644 index 0000000..e31c250 --- /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-storage-transfer/.kokoro/dependencies.sh" +} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg new file mode 100644 index 0000000..dded67a --- /dev/null +++ b/.kokoro/presubmit/integration.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg new file mode 100644 index 0000000..709f2b4 --- /dev/null +++ b/.kokoro/presubmit/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg new file mode 100644 index 0000000..cb24f44 --- /dev/null +++ b/.kokoro/presubmit/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg new file mode 100644 index 0000000..c9b62e3 --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-storage-transfer/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 0000000..ab0e966 --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-storage-transfer/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg new file mode 100644 index 0000000..495cc7b --- /dev/null +++ b/.kokoro/presubmit/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg new file mode 100644 index 0000000..34ac096 --- /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-storage-transfer/.kokoro/linkage-monitor.sh" +} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg new file mode 100644 index 0000000..6d323c8 --- /dev/null +++ b/.kokoro/presubmit/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg new file mode 100644 index 0000000..01e0960 --- /dev/null +++ b/.kokoro/presubmit/samples.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-docs-samples-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" +} \ No newline at end of file diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh new file mode 100755 index 0000000..f4aa653 --- /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-storage-transfer + +# 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-storage-transfer \ + --synth-file-name=.github/readme/synth.py \ + --metadata-path=.github/readme/synth.metadata \ + --pr-title="chore: regenerate README" \ + --branch-suffix="readme" + +# autosynth returns 28 to signal there are no changes +RETURN_CODE=$? +if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]] +then + exit ${RETURN_CODE} +fi diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg new file mode 100644 index 0000000..aa5ff89 --- /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-storage-transfer/.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-storage-transfer/.kokoro/release/bump_snapshot.sh" +} + +# tokens used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" + } + } +} diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg new file mode 100644 index 0000000..4f21bc1 --- /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-storage-transfer/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-keyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-passphrase" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-pubkeyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "sonatype-credentials" + } + } +} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh new file mode 100755 index 0000000..6e3f659 --- /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 0000000..2cf2982 --- /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-storage-transfer/.kokoro/release/drop.sh" +} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh new file mode 100755 index 0000000..5c4551e --- /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 0000000..8261220 --- /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-storage-transfer/.kokoro/release/promote.sh" +} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh new file mode 100755 index 0000000..1fa95fa --- /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 0000000..0194839 --- /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-storage-transfer/.kokoro/release/publish_javadoc.sh" +} + + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh new file mode 100755 index 0000000..fb40588 --- /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-storage-transfer +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# build the docs +mvn site -B -q + +pushd target/site/apidocs + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload docs +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg new file mode 100644 index 0000000..c0ac8e9 --- /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-storage-transfer/.kokoro/release/publish_javadoc11.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh new file mode 100755 index 0000000..186e4b8 --- /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-storage-transfer +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# V3 generates docfx yml from javadoc +# generate yml +mvn clean site -B -q -P docFX + +# copy README to docfx-yml dir and rename index.md +cp README.md target/docfx-yml/index.md +# copy CHANGELOG to docfx-yml dir and rename history.md +cp CHANGELOG.md target/docfx-yml/history.md + +pushd target/docfx-yml + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --xrefs devsite://java/gax \ + --xrefs devsite://java/google-cloud-core \ + --xrefs devsite://java/api-common \ + --xrefs devsite://java/proto-google-common-protos \ + --xrefs devsite://java/google-api-client \ + --xrefs devsite://java/google-http-client \ + --xrefs devsite://java/protobuf \ + --language java + +# upload yml to production bucket +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} \ + --destination-prefix docfx diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg new file mode 100644 index 0000000..ccb0df4 --- /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-storage-transfer/.kokoro/release/snapshot.sh" +} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh new file mode 100755 index 0000000..1f55b77 --- /dev/null +++ b/.kokoro/release/snapshot.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +# ensure we're trying to push a snapshot (no-result returns non-zero exit code) +grep SNAPSHOT versions.txt + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg new file mode 100644 index 0000000..37cc900 --- /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-storage-transfer/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-storage-transfer/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-storage-transfer" + } +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" +} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh new file mode 100755 index 0000000..8a10338 --- /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 0000000..9da0f83 --- /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 0000000..a90fe4d --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "name": "storage-transfer", + "name_pretty": "Storage Transfer Service", + "product_documentation": "https://cloud.google.com/storage-transfer-service", + "api_description": "Secure, low-cost services for transferring data from cloud or on-premises sources.", + "client_documentation": "https://googleapis.dev/java/google-cloud-storage-transfer/latest/index.html", + "release_level": "beta", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-storage-transfer", + "repo_short": "java-storage-transfer", + "distribution_name": "com.google.cloud:google-cloud-storage-transfer", + "api_id": "storage-transfer.googleapis.com", + "library_type": "GAPIC_AUTO", + "requires_billing": true +} \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..2add254 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f2dbdee --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,139 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows +[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). + +## Building the project + +To build, package, and run all unit tests run the command + +``` +mvn clean verify +``` + +### Running Integration tests + +To include integration tests when building the project, you need access to +a GCP Project with a valid service account. + +For instructions on how to generate a service account and corresponding +credentials JSON see: [Creating a Service Account][1]. + +Then run the following to build, package, run all unit tests and run all +integration tests. + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-integration-tests clean verify +``` + +## Code Samples + +Code Samples must be bundled in separate Maven modules, and guarded by a +Maven profile with the name `enable-samples`. + +The samples must be separate from the primary project for a few reasons: +1. Primary projects have a minimum Java version of Java 7 whereas samples have + a minimum Java version of Java 8. Due to this we need the ability to + selectively exclude samples from a build run. +2. Many code samples depend on external GCP services and need + credentials to access the service. +3. Code samples are not released as Maven artifacts and must be excluded from + release builds. + +### Building + +```bash +mvn -Penable-samples clean verify +``` + +Some samples require access to GCP services and require a service account: + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-samples clean verify +``` + +### Profile Config + +1. To add samples in a profile to your Maven project, add the following to your +`pom.xml` + + ```xml + + [...] + + + enable-samples + + sample + + + + [...] + + ``` + +2. [Activate](#profile-activation) the profile. +3. Define your samples in a normal Maven project in the `samples/` directory. + +### Code Formatting + +Code in this repo is formatted with +[google-java-format](https://github.com/google/google-java-format). +To run formatting on your project, you can run: +``` +mvn com.coveo:fmt-maven-plugin:format +``` + +### Profile Activation + +To include code samples when building and testing the project, enable the +`enable-samples` Maven profile. + +#### Command line + +To activate the Maven profile on the command line add `-Penable-samples` to your +Maven command. + +#### Maven `settings.xml` + +To activate the Maven profile in your `~/.m2/settings.xml` add an entry of +`enable-samples` following the instructions in [Active Profiles][2]. + +This method has the benefit of applying to all projects you build (and is +respected by IntelliJ IDEA) and is recommended if you are going to be +contributing samples to several projects. + +#### IntelliJ IDEA + +To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in +[Activate Maven profiles][3] to activate `enable-samples`. + +[1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account +[2]: https://maven.apache.org/settings.html#Active_Profiles +[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ee5a5ac --- /dev/null +++ b/README.md @@ -0,0 +1,202 @@ +# Google Storage Transfer Service Client for Java + +Java idiomatic client for [Storage Transfer Service][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + + +## Quickstart + + +If you are using Maven, add this to your pom.xml file: + + +```xml + + com.google.cloud + google-cloud-storage-transfer + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies + +```Groovy +compile 'com.google.cloud:google-cloud-storage-transfer:0.0.0' +``` + +If you are using SBT, add this to your dependencies + +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-storage-transfer" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Authorization + +The client application making API calls must be granted [authorization scopes][auth-scopes] required for the desired Storage Transfer Service APIs, and the authenticated principal must have the [IAM role(s)][predefined-iam-roles] required to access GCP resources using the Storage Transfer Service API calls. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Storage Transfer Service [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Storage Transfer Service. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-storage-transfer` library. See the [Quickstart](#quickstart) section +to add `google-cloud-storage-transfer` as a dependency in your code. + +## About Storage Transfer Service + + +[Storage Transfer Service][product-docs] Secure, low-cost services for transferring data from cloud or on-premises sources. + +See the [Storage Transfer Service client library docs][javadocs] to learn how to +use this Storage Transfer Service Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Storage Transfer Service uses gRPC for the transport layer. + +## Supported Java Versions + +Java 7 or above is required for using this client. + +Google's Java client libraries, +[Google Cloud Client Libraries][cloudlibs] +and +[Google Cloud API Libraries][apilibs], +follow the +[Oracle Java SE support roadmap][oracle] +(see the Oracle Java SE Product Releases section). + +### For new development + +In general, new feature development occurs with support for the lowest Java +LTS version covered by Oracle's Premier Support (which typically lasts 5 years +from initial General Availability). If the minimum required JVM for a given +library is changed, it is accompanied by a [semver][semver] major release. + +Java 11 and (in September 2021) Java 17 are the best choices for new +development. + +### Keeping production systems current + +Google tests its client libraries with all current LTS versions covered by +Oracle's Extended Support (which typically lasts 8 years from initial +General Availability). + +#### Legacy support + +Google's client libraries support legacy versions of Java runtimes with long +term stable libraries that don't receive feature updates on a best efforts basis +as it may not be possible to backport all patches. + +Google provides updates on a best efforts basis to apps that continue to use +Java 7, though apps might need to upgrade to current versions of the library +that supports their JVM. + +#### Where to find specific information + +The latest versions and the supported Java versions are identified on +the individual GitHub repository `github.com/GoogleAPIs/java-SERVICENAME` +and on [google-cloud-java][g-c-j]. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/storage-transfer-service +[javadocs]: https://googleapis.dev/java/google-cloud-storage-transfer/latest/index.html +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage-transfer/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage-transfer/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage-transfer/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage-transfer/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage-transfer/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage-transfer/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage-transfer/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage-transfer/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage-transfer/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage-transfer/java11.html +[stability-image]: https://img.shields.io/badge/stability-beta-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-storage-transfer.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-storage-transfer&core=gav +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes +[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles +[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-sdk]: https://cloud.google.com/sdk/ +[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-storage-transfer/blob/master/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-storage-transfer/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-storage-transfer/blob/master/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=storage-transfer.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png + +[semver]: https://semver.org/ +[cloudlibs]: https://cloud.google.com/apis/docs/client-libraries-explained +[apilibs]: https://cloud.google.com/apis/docs/client-libraries-explained#google_api_client_libraries +[oracle]: https://www.oracle.com/java/technologies/java-se-support-roadmap.html +[g-c-j]: http://github.com/googleapis/google-cloud-java diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..8b58ae9 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Security Policy + +To report a security issue, please use [g.co/vulnz](https://g.co/vulnz). + +The Google Security Team will respond within 5 working days of your report on g.co/vulnz. + +We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue. diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 0000000..5724ea9 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/google-cloud-storage-transfer-bom/pom.xml b/google-cloud-storage-transfer-bom/pom.xml new file mode 100644 index 0000000..859925e --- /dev/null +++ b/google-cloud-storage-transfer-bom/pom.xml @@ -0,0 +1,85 @@ + + + 4.0.0 + com.google.cloud + google-cloud-storage-transfer-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 0.11.0 + + + Google Storage Transfer Service BOM + https://github.com/googleapis/java-storage-transfer + + BOM for Storage Transfer Service + + + + Google LLC + + + + + chingor13 + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + + + scm:git:https://github.com/googleapis/java-storage-transfer.git + scm:git:git@github.com:googleapis/java-storage-transfer.git + https://github.com/googleapis/java-storage-transfer + + + + true + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + com.google.cloud + google-cloud-storage-transfer + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-storage-transfer-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-storage-transfer-v1 + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + diff --git a/google-cloud-storage-transfer/pom.xml b/google-cloud-storage-transfer/pom.xml new file mode 100644 index 0000000..c5bfd7e --- /dev/null +++ b/google-cloud-storage-transfer/pom.xml @@ -0,0 +1,111 @@ + + + 4.0.0 + com.google.cloud + google-cloud-storage-transfer + 0.0.1-SNAPSHOT + jar + Google Storage Transfer Service + https://github.com/googleapis/java-storage-transfer + Storage Transfer Service Secure, low-cost services for transferring data from cloud or on-premises sources. + + com.google.cloud + google-cloud-storage-transfer-parent + 0.0.1-SNAPSHOT + + + google-cloud-storage-transfer + + + + 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-storage-transfer-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + org.threeten + threetenbp + + + + + junit + junit + test + 4.13.2 + + + + com.google.api.grpc + grpc-google-cloud-storage-transfer-v1 + test + + + + com.google.api + gax-grpc + testlib + test + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/StorageTransferServiceClient.java b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/StorageTransferServiceClient.java new file mode 100644 index 0000000..d5dc6e3 --- /dev/null +++ b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/StorageTransferServiceClient.java @@ -0,0 +1,805 @@ +/* + * 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.storagetransfer.v1.proto; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import com.google.storagetransfer.v1.proto.stub.StorageTransferServiceStub; +import com.google.storagetransfer.v1.proto.stub.StorageTransferServiceStubSettings; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Storage Transfer Service and its protos. Transfers data between between + * Google Cloud Storage buckets or from a data source external to Google to a Cloud Storage bucket. + * + *

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 (StorageTransferServiceClient storageTransferServiceClient =
+ *     StorageTransferServiceClient.create()) {
+ *   TransferProto.GetGoogleServiceAccountRequest request =
+ *       TransferProto.GetGoogleServiceAccountRequest.newBuilder()
+ *           .setProjectId("projectId-894832108")
+ *           .build();
+ *   TransferTypes.GoogleServiceAccount response =
+ *       storageTransferServiceClient.getGoogleServiceAccount(request);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * StorageTransferServiceSettings storageTransferServiceSettings =
+ *     StorageTransferServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * StorageTransferServiceClient storageTransferServiceClient =
+ *     StorageTransferServiceClient.create(storageTransferServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * StorageTransferServiceSettings storageTransferServiceSettings =
+ *     StorageTransferServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * StorageTransferServiceClient storageTransferServiceClient =
+ *     StorageTransferServiceClient.create(storageTransferServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class StorageTransferServiceClient implements BackgroundResource { + private final StorageTransferServiceSettings settings; + private final StorageTransferServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of StorageTransferServiceClient with default settings. */ + public static final StorageTransferServiceClient create() throws IOException { + return create(StorageTransferServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of StorageTransferServiceClient, 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 StorageTransferServiceClient create(StorageTransferServiceSettings settings) + throws IOException { + return new StorageTransferServiceClient(settings); + } + + /** + * Constructs an instance of StorageTransferServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(StorageTransferServiceSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final StorageTransferServiceClient create(StorageTransferServiceStub stub) { + return new StorageTransferServiceClient(stub); + } + + /** + * Constructs an instance of StorageTransferServiceClient, 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 StorageTransferServiceClient(StorageTransferServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((StorageTransferServiceStubSettings) 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 StorageTransferServiceClient(StorageTransferServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final StorageTransferServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public StorageTransferServiceStub 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. + /** + * Returns the Google service account that is used by Storage Transfer Service to access buckets + * in the project where transfers run or in other projects. Each Google service account is + * associated with one Google Cloud Platform Console project. Users should add this service + * account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. + * This service account is created and owned by Storage Transfer Service and can only be used by + * Storage Transfer Service. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.GetGoogleServiceAccountRequest request =
+   *       TransferProto.GetGoogleServiceAccountRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .build();
+   *   TransferTypes.GoogleServiceAccount response =
+   *       storageTransferServiceClient.getGoogleServiceAccount(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransferTypes.GoogleServiceAccount getGoogleServiceAccount( + TransferProto.GetGoogleServiceAccountRequest request) { + return getGoogleServiceAccountCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Google service account that is used by Storage Transfer Service to access buckets + * in the project where transfers run or in other projects. Each Google service account is + * associated with one Google Cloud Platform Console project. Users should add this service + * account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. + * This service account is created and owned by Storage Transfer Service and can only be used by + * Storage Transfer Service. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.GetGoogleServiceAccountRequest request =
+   *       TransferProto.GetGoogleServiceAccountRequest.newBuilder()
+   *           .setProjectId("projectId-894832108")
+   *           .build();
+   *   ApiFuture future =
+   *       storageTransferServiceClient.getGoogleServiceAccountCallable().futureCall(request);
+   *   // Do something.
+   *   TransferTypes.GoogleServiceAccount response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + TransferProto.GetGoogleServiceAccountRequest, TransferTypes.GoogleServiceAccount> + getGoogleServiceAccountCallable() { + return stub.getGoogleServiceAccountCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a transfer job that runs periodically. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.CreateTransferJobRequest request =
+   *       TransferProto.CreateTransferJobRequest.newBuilder()
+   *           .setTransferJob(TransferTypes.TransferJob.newBuilder().build())
+   *           .build();
+   *   TransferTypes.TransferJob response = storageTransferServiceClient.createTransferJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransferTypes.TransferJob createTransferJob( + TransferProto.CreateTransferJobRequest request) { + return createTransferJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a transfer job that runs periodically. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.CreateTransferJobRequest request =
+   *       TransferProto.CreateTransferJobRequest.newBuilder()
+   *           .setTransferJob(TransferTypes.TransferJob.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       storageTransferServiceClient.createTransferJobCallable().futureCall(request);
+   *   // Do something.
+   *   TransferTypes.TransferJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createTransferJobCallable() { + return stub.createTransferJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that + * are running already. + * + *

**Note:** The job's [status][google.storagetransfer.v1.TransferJob.status] + * field can be modified using this RPC (for example, to set a job's status to + * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED], + * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], or + * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED]). + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.UpdateTransferJobRequest request =
+   *       TransferProto.UpdateTransferJobRequest.newBuilder()
+   *           .setJobName("jobName-1438096408")
+   *           .setProjectId("projectId-894832108")
+   *           .setTransferJob(TransferTypes.TransferJob.newBuilder().build())
+   *           .setUpdateTransferJobFieldMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   TransferTypes.TransferJob response = storageTransferServiceClient.updateTransferJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransferTypes.TransferJob updateTransferJob( + TransferProto.UpdateTransferJobRequest request) { + return updateTransferJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that + * are running already. + * + *

**Note:** The job's [status][google.storagetransfer.v1.TransferJob.status] + * field can be modified using this RPC (for example, to set a job's status to + * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED], + * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], or + * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED]). + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.UpdateTransferJobRequest request =
+   *       TransferProto.UpdateTransferJobRequest.newBuilder()
+   *           .setJobName("jobName-1438096408")
+   *           .setProjectId("projectId-894832108")
+   *           .setTransferJob(TransferTypes.TransferJob.newBuilder().build())
+   *           .setUpdateTransferJobFieldMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       storageTransferServiceClient.updateTransferJobCallable().futureCall(request);
+   *   // Do something.
+   *   TransferTypes.TransferJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateTransferJobCallable() { + return stub.updateTransferJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a transfer job. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.GetTransferJobRequest request =
+   *       TransferProto.GetTransferJobRequest.newBuilder()
+   *           .setJobName("jobName-1438096408")
+   *           .setProjectId("projectId-894832108")
+   *           .build();
+   *   TransferTypes.TransferJob response = storageTransferServiceClient.getTransferJob(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransferTypes.TransferJob getTransferJob( + TransferProto.GetTransferJobRequest request) { + return getTransferJobCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a transfer job. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.GetTransferJobRequest request =
+   *       TransferProto.GetTransferJobRequest.newBuilder()
+   *           .setJobName("jobName-1438096408")
+   *           .setProjectId("projectId-894832108")
+   *           .build();
+   *   ApiFuture future =
+   *       storageTransferServiceClient.getTransferJobCallable().futureCall(request);
+   *   // Do something.
+   *   TransferTypes.TransferJob response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getTransferJobCallable() { + return stub.getTransferJobCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists transfer jobs. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.ListTransferJobsRequest request =
+   *       TransferProto.ListTransferJobsRequest.newBuilder()
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (TransferTypes.TransferJob element :
+   *       storageTransferServiceClient.listTransferJobs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTransferJobsPagedResponse listTransferJobs( + TransferProto.ListTransferJobsRequest request) { + return listTransferJobsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists transfer jobs. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.ListTransferJobsRequest request =
+   *       TransferProto.ListTransferJobsRequest.newBuilder()
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       storageTransferServiceClient.listTransferJobsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (TransferTypes.TransferJob element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listTransferJobsPagedCallable() { + return stub.listTransferJobsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists transfer jobs. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.ListTransferJobsRequest request =
+   *       TransferProto.ListTransferJobsRequest.newBuilder()
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     TransferProto.ListTransferJobsResponse response =
+   *         storageTransferServiceClient.listTransferJobsCallable().call(request);
+   *     for (TransferTypes.TransferJob element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + TransferProto.ListTransferJobsRequest, TransferProto.ListTransferJobsResponse> + listTransferJobsCallable() { + return stub.listTransferJobsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses a transfer operation. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.PauseTransferOperationRequest request =
+   *       TransferProto.PauseTransferOperationRequest.newBuilder().setName("name3373707").build();
+   *   storageTransferServiceClient.pauseTransferOperation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void pauseTransferOperation(TransferProto.PauseTransferOperationRequest request) { + pauseTransferOperationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses a transfer operation. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.PauseTransferOperationRequest request =
+   *       TransferProto.PauseTransferOperationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       storageTransferServiceClient.pauseTransferOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + pauseTransferOperationCallable() { + return stub.pauseTransferOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resumes a transfer operation that is paused. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.ResumeTransferOperationRequest request =
+   *       TransferProto.ResumeTransferOperationRequest.newBuilder().setName("name3373707").build();
+   *   storageTransferServiceClient.resumeTransferOperation(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void resumeTransferOperation(TransferProto.ResumeTransferOperationRequest request) { + resumeTransferOperationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resumes a transfer operation that is paused. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.ResumeTransferOperationRequest request =
+   *       TransferProto.ResumeTransferOperationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       storageTransferServiceClient.resumeTransferOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + resumeTransferOperationCallable() { + return stub.resumeTransferOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Attempts to start a new TransferOperation for the current TransferJob. A TransferJob has a + * maximum of one active TransferOperation. If this method is called while a TransferOperation is + * active, an error wil be returned. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.RunTransferJobRequest request =
+   *       TransferProto.RunTransferJobRequest.newBuilder()
+   *           .setJobName("jobName-1438096408")
+   *           .setProjectId("projectId-894832108")
+   *           .build();
+   *   storageTransferServiceClient.runTransferJobAsync(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 runTransferJobAsync( + TransferProto.RunTransferJobRequest request) { + return runTransferJobOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Attempts to start a new TransferOperation for the current TransferJob. A TransferJob has a + * maximum of one active TransferOperation. If this method is called while a TransferOperation is + * active, an error wil be returned. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.RunTransferJobRequest request =
+   *       TransferProto.RunTransferJobRequest.newBuilder()
+   *           .setJobName("jobName-1438096408")
+   *           .setProjectId("projectId-894832108")
+   *           .build();
+   *   OperationFuture future =
+   *       storageTransferServiceClient.runTransferJobOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + TransferProto.RunTransferJobRequest, Empty, TransferTypes.TransferOperation> + runTransferJobOperationCallable() { + return stub.runTransferJobOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Attempts to start a new TransferOperation for the current TransferJob. A TransferJob has a + * maximum of one active TransferOperation. If this method is called while a TransferOperation is + * active, an error wil be returned. + * + *

Sample code: + * + *

{@code
+   * try (StorageTransferServiceClient storageTransferServiceClient =
+   *     StorageTransferServiceClient.create()) {
+   *   TransferProto.RunTransferJobRequest request =
+   *       TransferProto.RunTransferJobRequest.newBuilder()
+   *           .setJobName("jobName-1438096408")
+   *           .setProjectId("projectId-894832108")
+   *           .build();
+   *   ApiFuture future =
+   *       storageTransferServiceClient.runTransferJobCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + runTransferJobCallable() { + return stub.runTransferJobCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListTransferJobsPagedResponse + extends AbstractPagedListResponse< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + TransferTypes.TransferJob, + ListTransferJobsPage, + ListTransferJobsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + TransferTypes.TransferJob> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTransferJobsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListTransferJobsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListTransferJobsPagedResponse(ListTransferJobsPage page) { + super(page, ListTransferJobsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTransferJobsPage + extends AbstractPage< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + TransferTypes.TransferJob, + ListTransferJobsPage> { + + private ListTransferJobsPage( + PageContext< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + TransferTypes.TransferJob> + context, + TransferProto.ListTransferJobsResponse response) { + super(context, response); + } + + private static ListTransferJobsPage createEmptyPage() { + return new ListTransferJobsPage(null, null); + } + + @Override + protected ListTransferJobsPage createPage( + PageContext< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + TransferTypes.TransferJob> + context, + TransferProto.ListTransferJobsResponse response) { + return new ListTransferJobsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + TransferTypes.TransferJob> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTransferJobsFixedSizeCollection + extends AbstractFixedSizeCollection< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + TransferTypes.TransferJob, + ListTransferJobsPage, + ListTransferJobsFixedSizeCollection> { + + private ListTransferJobsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTransferJobsFixedSizeCollection createEmptyCollection() { + return new ListTransferJobsFixedSizeCollection(null, 0); + } + + @Override + protected ListTransferJobsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTransferJobsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/StorageTransferServiceSettings.java b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/StorageTransferServiceSettings.java new file mode 100644 index 0000000..0c39a2b --- /dev/null +++ b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/StorageTransferServiceSettings.java @@ -0,0 +1,304 @@ +/* + * 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.storagetransfer.v1.proto; + +import static com.google.storagetransfer.v1.proto.StorageTransferServiceClient.ListTransferJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.storagetransfer.v1.proto.stub.StorageTransferServiceStubSettings; +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 StorageTransferServiceClient}. + * + *

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

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

{@code
+ * StorageTransferServiceSettings.Builder storageTransferServiceSettingsBuilder =
+ *     StorageTransferServiceSettings.newBuilder();
+ * storageTransferServiceSettingsBuilder
+ *     .getGoogleServiceAccountSettings()
+ *     .setRetrySettings(
+ *         storageTransferServiceSettingsBuilder
+ *             .getGoogleServiceAccountSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * StorageTransferServiceSettings storageTransferServiceSettings =
+ *     storageTransferServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class StorageTransferServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to getGoogleServiceAccount. */ + public UnaryCallSettings< + TransferProto.GetGoogleServiceAccountRequest, TransferTypes.GoogleServiceAccount> + getGoogleServiceAccountSettings() { + return ((StorageTransferServiceStubSettings) getStubSettings()) + .getGoogleServiceAccountSettings(); + } + + /** Returns the object with the settings used for calls to createTransferJob. */ + public UnaryCallSettings + createTransferJobSettings() { + return ((StorageTransferServiceStubSettings) getStubSettings()).createTransferJobSettings(); + } + + /** Returns the object with the settings used for calls to updateTransferJob. */ + public UnaryCallSettings + updateTransferJobSettings() { + return ((StorageTransferServiceStubSettings) getStubSettings()).updateTransferJobSettings(); + } + + /** Returns the object with the settings used for calls to getTransferJob. */ + public UnaryCallSettings + getTransferJobSettings() { + return ((StorageTransferServiceStubSettings) getStubSettings()).getTransferJobSettings(); + } + + /** Returns the object with the settings used for calls to listTransferJobs. */ + public PagedCallSettings< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + ListTransferJobsPagedResponse> + listTransferJobsSettings() { + return ((StorageTransferServiceStubSettings) getStubSettings()).listTransferJobsSettings(); + } + + /** Returns the object with the settings used for calls to pauseTransfer. */ + public UnaryCallSettings + pauseTransferOperationSettings() { + return ((StorageTransferServiceStubSettings) getStubSettings()) + .pauseTransferOperationSettings(); + } + + /** Returns the object with the settings used for calls to resumeTransfer. */ + public UnaryCallSettings + resumeTransferOperationSettings() { + return ((StorageTransferServiceStubSettings) getStubSettings()) + .resumeTransferOperationSettings(); + } + + /** Returns the object with the settings used for calls to runTransferJob. */ + public UnaryCallSettings + runTransferJobSettings() { + return ((StorageTransferServiceStubSettings) getStubSettings()).runTransferJobSettings(); + } + + /** Returns the object with the settings used for calls to runTransferJob. */ + public OperationCallSettings< + TransferProto.RunTransferJobRequest, Empty, TransferTypes.TransferOperation> + runTransferJobOperationSettings() { + return ((StorageTransferServiceStubSettings) getStubSettings()) + .runTransferJobOperationSettings(); + } + + public static final StorageTransferServiceSettings create(StorageTransferServiceStubSettings stub) + throws IOException { + return new StorageTransferServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return StorageTransferServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return StorageTransferServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return StorageTransferServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return StorageTransferServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return StorageTransferServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return StorageTransferServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return StorageTransferServiceStubSettings.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 StorageTransferServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for StorageTransferServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(StorageTransferServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(StorageTransferServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(StorageTransferServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(StorageTransferServiceStubSettings.newBuilder()); + } + + public StorageTransferServiceStubSettings.Builder getStubSettingsBuilder() { + return ((StorageTransferServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getGoogleServiceAccount. */ + public UnaryCallSettings.Builder< + TransferProto.GetGoogleServiceAccountRequest, TransferTypes.GoogleServiceAccount> + getGoogleServiceAccountSettings() { + return getStubSettingsBuilder().getGoogleServiceAccountSettings(); + } + + /** Returns the builder for the settings used for calls to createTransferJob. */ + public UnaryCallSettings.Builder< + TransferProto.CreateTransferJobRequest, TransferTypes.TransferJob> + createTransferJobSettings() { + return getStubSettingsBuilder().createTransferJobSettings(); + } + + /** Returns the builder for the settings used for calls to updateTransferJob. */ + public UnaryCallSettings.Builder< + TransferProto.UpdateTransferJobRequest, TransferTypes.TransferJob> + updateTransferJobSettings() { + return getStubSettingsBuilder().updateTransferJobSettings(); + } + + /** Returns the builder for the settings used for calls to getTransferJob. */ + public UnaryCallSettings.Builder + getTransferJobSettings() { + return getStubSettingsBuilder().getTransferJobSettings(); + } + + /** Returns the builder for the settings used for calls to listTransferJobs. */ + public PagedCallSettings.Builder< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + ListTransferJobsPagedResponse> + listTransferJobsSettings() { + return getStubSettingsBuilder().listTransferJobsSettings(); + } + + /** Returns the builder for the settings used for calls to pauseTransfer. */ + public UnaryCallSettings.Builder + pauseTransferOperationSettings() { + return getStubSettingsBuilder().pauseTransferOperationSettings(); + } + + /** Returns the builder for the settings used for calls to resumeTransfer. */ + public UnaryCallSettings.Builder + resumeTransferOperationSettings() { + return getStubSettingsBuilder().resumeTransferOperationSettings(); + } + + /** Returns the builder for the settings used for calls to runTransferJob. */ + public UnaryCallSettings.Builder + runTransferJobSettings() { + return getStubSettingsBuilder().runTransferJobSettings(); + } + + /** Returns the builder for the settings used for calls to runTransferJob. */ + public OperationCallSettings.Builder< + TransferProto.RunTransferJobRequest, Empty, TransferTypes.TransferOperation> + runTransferJobOperationSettings() { + return getStubSettingsBuilder().runTransferJobOperationSettings(); + } + + @Override + public StorageTransferServiceSettings build() throws IOException { + return new StorageTransferServiceSettings(this); + } + } +} diff --git a/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/gapic_metadata.json b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/gapic_metadata.json new file mode 100644 index 0000000..db13813 --- /dev/null +++ b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/gapic_metadata.json @@ -0,0 +1,42 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.storagetransfer.v1", + "libraryPackage": "com.google.storagetransfer.v1.proto", + "services": { + "StorageTransferService": { + "clients": { + "grpc": { + "libraryClient": "StorageTransferServiceClient", + "rpcs": { + "CreateTransferJob": { + "methods": ["createTransferJob", "createTransferJobCallable"] + }, + "GetGoogleServiceAccount": { + "methods": ["getGoogleServiceAccount", "getGoogleServiceAccountCallable"] + }, + "GetTransferJob": { + "methods": ["getTransferJob", "getTransferJobCallable"] + }, + "ListTransferJobs": { + "methods": ["listTransferJobs", "listTransferJobsPagedCallable", "listTransferJobsCallable"] + }, + "PauseTransferOperation": { + "methods": ["pauseTransferOperation", "pauseTransferOperationCallable"] + }, + "ResumeTransferOperation": { + "methods": ["resumeTransferOperation", "resumeTransferOperationCallable"] + }, + "RunTransferJob": { + "methods": ["runTransferJobAsync", "runTransferJobOperationCallable", "runTransferJobCallable"] + }, + "UpdateTransferJob": { + "methods": ["updateTransferJob", "updateTransferJobCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/package-info.java b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/package-info.java new file mode 100644 index 0000000..532281a --- /dev/null +++ b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/package-info.java @@ -0,0 +1,42 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= StorageTransferServiceClient ======================= + * + *

Service Description: Storage Transfer Service and its protos. Transfers data between between + * Google Cloud Storage buckets or from a data source external to Google to a Cloud Storage bucket. + * + *

Sample for StorageTransferServiceClient: + * + *

{@code
+ * try (StorageTransferServiceClient storageTransferServiceClient =
+ *     StorageTransferServiceClient.create()) {
+ *   TransferProto.GetGoogleServiceAccountRequest request =
+ *       TransferProto.GetGoogleServiceAccountRequest.newBuilder()
+ *           .setProjectId("projectId-894832108")
+ *           .build();
+ *   TransferTypes.GoogleServiceAccount response =
+ *       storageTransferServiceClient.getGoogleServiceAccount(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.storagetransfer.v1.proto; + +import javax.annotation.Generated; diff --git a/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/GrpcStorageTransferServiceCallableFactory.java b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/GrpcStorageTransferServiceCallableFactory.java new file mode 100644 index 0000000..a28a950 --- /dev/null +++ b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/GrpcStorageTransferServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.storagetransfer.v1.proto.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the StorageTransferService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcStorageTransferServiceCallableFactory 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-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/GrpcStorageTransferServiceStub.java b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/GrpcStorageTransferServiceStub.java new file mode 100644 index 0000000..5a37110 --- /dev/null +++ b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/GrpcStorageTransferServiceStub.java @@ -0,0 +1,459 @@ +/* + * 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.storagetransfer.v1.proto.stub; + +import static com.google.storagetransfer.v1.proto.StorageTransferServiceClient.ListTransferJobsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import com.google.storagetransfer.v1.proto.TransferProto; +import com.google.storagetransfer.v1.proto.TransferTypes; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the StorageTransferService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcStorageTransferServiceStub extends StorageTransferServiceStub { + private static final MethodDescriptor< + TransferProto.GetGoogleServiceAccountRequest, TransferTypes.GoogleServiceAccount> + getGoogleServiceAccountMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.storagetransfer.v1.StorageTransferService/GetGoogleServiceAccount") + .setRequestMarshaller( + ProtoUtils.marshaller( + TransferProto.GetGoogleServiceAccountRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TransferTypes.GoogleServiceAccount.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + TransferProto.CreateTransferJobRequest, TransferTypes.TransferJob> + createTransferJobMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.storagetransfer.v1.StorageTransferService/CreateTransferJob") + .setRequestMarshaller( + ProtoUtils.marshaller( + TransferProto.CreateTransferJobRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TransferTypes.TransferJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + TransferProto.UpdateTransferJobRequest, TransferTypes.TransferJob> + updateTransferJobMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.storagetransfer.v1.StorageTransferService/UpdateTransferJob") + .setRequestMarshaller( + ProtoUtils.marshaller( + TransferProto.UpdateTransferJobRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TransferTypes.TransferJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + TransferProto.GetTransferJobRequest, TransferTypes.TransferJob> + getTransferJobMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.storagetransfer.v1.StorageTransferService/GetTransferJob") + .setRequestMarshaller( + ProtoUtils.marshaller(TransferProto.GetTransferJobRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TransferTypes.TransferJob.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + TransferProto.ListTransferJobsRequest, TransferProto.ListTransferJobsResponse> + listTransferJobsMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.storagetransfer.v1.StorageTransferService/ListTransferJobs") + .setRequestMarshaller( + ProtoUtils.marshaller(TransferProto.ListTransferJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + TransferProto.ListTransferJobsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + pauseTransferOperationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.storagetransfer.v1.StorageTransferService/PauseTransferOperation") + .setRequestMarshaller( + ProtoUtils.marshaller( + TransferProto.PauseTransferOperationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + resumeTransferOperationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.storagetransfer.v1.StorageTransferService/ResumeTransferOperation") + .setRequestMarshaller( + ProtoUtils.marshaller( + TransferProto.ResumeTransferOperationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + runTransferJobMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.storagetransfer.v1.StorageTransferService/RunTransferJob") + .setRequestMarshaller( + ProtoUtils.marshaller(TransferProto.RunTransferJobRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable< + TransferProto.GetGoogleServiceAccountRequest, TransferTypes.GoogleServiceAccount> + getGoogleServiceAccountCallable; + private final UnaryCallable + createTransferJobCallable; + private final UnaryCallable + updateTransferJobCallable; + private final UnaryCallable + getTransferJobCallable; + private final UnaryCallable< + TransferProto.ListTransferJobsRequest, TransferProto.ListTransferJobsResponse> + listTransferJobsCallable; + private final UnaryCallable + listTransferJobsPagedCallable; + private final UnaryCallable + pauseTransferOperationCallable; + private final UnaryCallable + resumeTransferOperationCallable; + private final UnaryCallable + runTransferJobCallable; + private final OperationCallable< + TransferProto.RunTransferJobRequest, Empty, TransferTypes.TransferOperation> + runTransferJobOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcStorageTransferServiceStub create( + StorageTransferServiceStubSettings settings) throws IOException { + return new GrpcStorageTransferServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcStorageTransferServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcStorageTransferServiceStub( + StorageTransferServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcStorageTransferServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcStorageTransferServiceStub( + StorageTransferServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcStorageTransferServiceStub, 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 GrpcStorageTransferServiceStub( + StorageTransferServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcStorageTransferServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcStorageTransferServiceStub, 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 GrpcStorageTransferServiceStub( + StorageTransferServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings< + TransferProto.GetGoogleServiceAccountRequest, TransferTypes.GoogleServiceAccount> + getGoogleServiceAccountTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(getGoogleServiceAccountMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("project_id", String.valueOf(request.getProjectId())); + return params.build(); + }) + .build(); + GrpcCallSettings + createTransferJobTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(createTransferJobMethodDescriptor) + .build(); + GrpcCallSettings + updateTransferJobTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(updateTransferJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("job_name", String.valueOf(request.getJobName())); + return params.build(); + }) + .build(); + GrpcCallSettings + getTransferJobTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getTransferJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("job_name", String.valueOf(request.getJobName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listTransferJobsTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(listTransferJobsMethodDescriptor) + .build(); + GrpcCallSettings + pauseTransferOperationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(pauseTransferOperationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + resumeTransferOperationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(resumeTransferOperationMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + runTransferJobTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(runTransferJobMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("job_name", String.valueOf(request.getJobName())); + return params.build(); + }) + .build(); + + this.getGoogleServiceAccountCallable = + callableFactory.createUnaryCallable( + getGoogleServiceAccountTransportSettings, + settings.getGoogleServiceAccountSettings(), + clientContext); + this.createTransferJobCallable = + callableFactory.createUnaryCallable( + createTransferJobTransportSettings, + settings.createTransferJobSettings(), + clientContext); + this.updateTransferJobCallable = + callableFactory.createUnaryCallable( + updateTransferJobTransportSettings, + settings.updateTransferJobSettings(), + clientContext); + this.getTransferJobCallable = + callableFactory.createUnaryCallable( + getTransferJobTransportSettings, settings.getTransferJobSettings(), clientContext); + this.listTransferJobsCallable = + callableFactory.createUnaryCallable( + listTransferJobsTransportSettings, settings.listTransferJobsSettings(), clientContext); + this.listTransferJobsPagedCallable = + callableFactory.createPagedCallable( + listTransferJobsTransportSettings, settings.listTransferJobsSettings(), clientContext); + this.pauseTransferOperationCallable = + callableFactory.createUnaryCallable( + pauseTransferOperationTransportSettings, + settings.pauseTransferOperationSettings(), + clientContext); + this.resumeTransferOperationCallable = + callableFactory.createUnaryCallable( + resumeTransferOperationTransportSettings, + settings.resumeTransferOperationSettings(), + clientContext); + this.runTransferJobCallable = + callableFactory.createUnaryCallable( + runTransferJobTransportSettings, settings.runTransferJobSettings(), clientContext); + this.runTransferJobOperationCallable = + callableFactory.createOperationCallable( + runTransferJobTransportSettings, + settings.runTransferJobOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable< + TransferProto.GetGoogleServiceAccountRequest, TransferTypes.GoogleServiceAccount> + getGoogleServiceAccountCallable() { + return getGoogleServiceAccountCallable; + } + + @Override + public UnaryCallable + createTransferJobCallable() { + return createTransferJobCallable; + } + + @Override + public UnaryCallable + updateTransferJobCallable() { + return updateTransferJobCallable; + } + + @Override + public UnaryCallable + getTransferJobCallable() { + return getTransferJobCallable; + } + + @Override + public UnaryCallable< + TransferProto.ListTransferJobsRequest, TransferProto.ListTransferJobsResponse> + listTransferJobsCallable() { + return listTransferJobsCallable; + } + + @Override + public UnaryCallable + listTransferJobsPagedCallable() { + return listTransferJobsPagedCallable; + } + + @Override + public UnaryCallable + pauseTransferOperationCallable() { + return pauseTransferOperationCallable; + } + + @Override + public UnaryCallable + resumeTransferOperationCallable() { + return resumeTransferOperationCallable; + } + + @Override + public UnaryCallable runTransferJobCallable() { + return runTransferJobCallable; + } + + @Override + public OperationCallable< + TransferProto.RunTransferJobRequest, Empty, TransferTypes.TransferOperation> + runTransferJobOperationCallable() { + return runTransferJobOperationCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/StorageTransferServiceStub.java b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/StorageTransferServiceStub.java new file mode 100644 index 0000000..dfd9924 --- /dev/null +++ b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/StorageTransferServiceStub.java @@ -0,0 +1,98 @@ +/* + * 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.storagetransfer.v1.proto.stub; + +import static com.google.storagetransfer.v1.proto.StorageTransferServiceClient.ListTransferJobsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import com.google.protobuf.Empty; +import com.google.storagetransfer.v1.proto.TransferProto; +import com.google.storagetransfer.v1.proto.TransferTypes; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the StorageTransferService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class StorageTransferServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable< + TransferProto.GetGoogleServiceAccountRequest, TransferTypes.GoogleServiceAccount> + getGoogleServiceAccountCallable() { + throw new UnsupportedOperationException("Not implemented: getGoogleServiceAccountCallable()"); + } + + public UnaryCallable + createTransferJobCallable() { + throw new UnsupportedOperationException("Not implemented: createTransferJobCallable()"); + } + + public UnaryCallable + updateTransferJobCallable() { + throw new UnsupportedOperationException("Not implemented: updateTransferJobCallable()"); + } + + public UnaryCallable + getTransferJobCallable() { + throw new UnsupportedOperationException("Not implemented: getTransferJobCallable()"); + } + + public UnaryCallable + listTransferJobsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTransferJobsPagedCallable()"); + } + + public UnaryCallable< + TransferProto.ListTransferJobsRequest, TransferProto.ListTransferJobsResponse> + listTransferJobsCallable() { + throw new UnsupportedOperationException("Not implemented: listTransferJobsCallable()"); + } + + public UnaryCallable + pauseTransferOperationCallable() { + throw new UnsupportedOperationException("Not implemented: pauseTransferOperationCallable()"); + } + + public UnaryCallable + resumeTransferOperationCallable() { + throw new UnsupportedOperationException("Not implemented: resumeTransferOperationCallable()"); + } + + public OperationCallable< + TransferProto.RunTransferJobRequest, Empty, TransferTypes.TransferOperation> + runTransferJobOperationCallable() { + throw new UnsupportedOperationException("Not implemented: runTransferJobOperationCallable()"); + } + + public UnaryCallable runTransferJobCallable() { + throw new UnsupportedOperationException("Not implemented: runTransferJobCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/StorageTransferServiceStubSettings.java b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/StorageTransferServiceStubSettings.java new file mode 100644 index 0000000..12709ef --- /dev/null +++ b/google-cloud-storage-transfer/src/main/java/com/google/storagetransfer/v1/proto/stub/StorageTransferServiceStubSettings.java @@ -0,0 +1,625 @@ +/* + * 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.storagetransfer.v1.proto.stub; + +import static com.google.storagetransfer.v1.proto.StorageTransferServiceClient.ListTransferJobsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.storagetransfer.v1.proto.TransferProto; +import com.google.storagetransfer.v1.proto.TransferTypes; +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 StorageTransferServiceStub}. + * + *

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

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

{@code
+ * StorageTransferServiceStubSettings.Builder storageTransferServiceSettingsBuilder =
+ *     StorageTransferServiceStubSettings.newBuilder();
+ * storageTransferServiceSettingsBuilder
+ *     .getGoogleServiceAccountSettings()
+ *     .setRetrySettings(
+ *         storageTransferServiceSettingsBuilder
+ *             .getGoogleServiceAccountSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * StorageTransferServiceStubSettings storageTransferServiceSettings =
+ *     storageTransferServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class StorageTransferServiceStubSettings + 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< + TransferProto.GetGoogleServiceAccountRequest, TransferTypes.GoogleServiceAccount> + getGoogleServiceAccountSettings; + private final UnaryCallSettings + createTransferJobSettings; + private final UnaryCallSettings + updateTransferJobSettings; + private final UnaryCallSettings + getTransferJobSettings; + private final PagedCallSettings< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + ListTransferJobsPagedResponse> + listTransferJobsSettings; + private final UnaryCallSettings + pauseTransferOperationSettings; + private final UnaryCallSettings + resumeTransferOperationSettings; + private final UnaryCallSettings + runTransferJobSettings; + private final OperationCallSettings< + TransferProto.RunTransferJobRequest, Empty, TransferTypes.TransferOperation> + runTransferJobOperationSettings; + + private static final PagedListDescriptor< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + TransferTypes.TransferJob> + LIST_TRANSFER_JOBS_PAGE_STR_DESC = + new PagedListDescriptor< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + TransferTypes.TransferJob>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public TransferProto.ListTransferJobsRequest injectToken( + TransferProto.ListTransferJobsRequest payload, String token) { + return TransferProto.ListTransferJobsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public TransferProto.ListTransferJobsRequest injectPageSize( + TransferProto.ListTransferJobsRequest payload, int pageSize) { + return TransferProto.ListTransferJobsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(TransferProto.ListTransferJobsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(TransferProto.ListTransferJobsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + TransferProto.ListTransferJobsResponse payload) { + return payload.getTransferJobsList() == null + ? ImmutableList.of() + : payload.getTransferJobsList(); + } + }; + + private static final PagedListResponseFactory< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + ListTransferJobsPagedResponse> + LIST_TRANSFER_JOBS_PAGE_STR_FACT = + new PagedListResponseFactory< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + ListTransferJobsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse> + callable, + TransferProto.ListTransferJobsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + TransferTypes.TransferJob> + pageContext = + PageContext.create( + callable, LIST_TRANSFER_JOBS_PAGE_STR_DESC, request, context); + return ListTransferJobsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to getGoogleServiceAccount. */ + public UnaryCallSettings< + TransferProto.GetGoogleServiceAccountRequest, TransferTypes.GoogleServiceAccount> + getGoogleServiceAccountSettings() { + return getGoogleServiceAccountSettings; + } + + /** Returns the object with the settings used for calls to createTransferJob. */ + public UnaryCallSettings + createTransferJobSettings() { + return createTransferJobSettings; + } + + /** Returns the object with the settings used for calls to updateTransferJob. */ + public UnaryCallSettings + updateTransferJobSettings() { + return updateTransferJobSettings; + } + + /** Returns the object with the settings used for calls to getTransferJob. */ + public UnaryCallSettings + getTransferJobSettings() { + return getTransferJobSettings; + } + + /** Returns the object with the settings used for calls to listTransferJobs. */ + public PagedCallSettings< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + ListTransferJobsPagedResponse> + listTransferJobsSettings() { + return listTransferJobsSettings; + } + + /** Returns the object with the settings used for calls to pauseTransfer. */ + public UnaryCallSettings + pauseTransferOperationSettings() { + return pauseTransferOperationSettings; + } + + /** Returns the object with the settings used for calls to resumeTransfer. */ + public UnaryCallSettings + resumeTransferOperationSettings() { + return resumeTransferOperationSettings; + } + + /** Returns the object with the settings used for calls to runTransferJob. */ + public UnaryCallSettings + runTransferJobSettings() { + return runTransferJobSettings; + } + + /** Returns the object with the settings used for calls to runTransferJob. */ + public OperationCallSettings< + TransferProto.RunTransferJobRequest, Empty, TransferTypes.TransferOperation> + runTransferJobOperationSettings() { + return runTransferJobOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public StorageTransferServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcStorageTransferServiceStub.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 "storagetransfer.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "storagetransfer.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** 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(StorageTransferServiceStubSettings.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 StorageTransferServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getGoogleServiceAccountSettings = settingsBuilder.getGoogleServiceAccountSettings().build(); + createTransferJobSettings = settingsBuilder.createTransferJobSettings().build(); + updateTransferJobSettings = settingsBuilder.updateTransferJobSettings().build(); + getTransferJobSettings = settingsBuilder.getTransferJobSettings().build(); + listTransferJobsSettings = settingsBuilder.listTransferJobsSettings().build(); + pauseTransferOperationSettings = settingsBuilder.pauseTransferOperationSettings().build(); + resumeTransferOperationSettings = settingsBuilder.resumeTransferOperationSettings().build(); + runTransferJobSettings = settingsBuilder.runTransferJobSettings().build(); + runTransferJobOperationSettings = settingsBuilder.runTransferJobOperationSettings().build(); + } + + /** Builder for StorageTransferServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder< + TransferProto.GetGoogleServiceAccountRequest, TransferTypes.GoogleServiceAccount> + getGoogleServiceAccountSettings; + private final UnaryCallSettings.Builder< + TransferProto.CreateTransferJobRequest, TransferTypes.TransferJob> + createTransferJobSettings; + private final UnaryCallSettings.Builder< + TransferProto.UpdateTransferJobRequest, TransferTypes.TransferJob> + updateTransferJobSettings; + private final UnaryCallSettings.Builder< + TransferProto.GetTransferJobRequest, TransferTypes.TransferJob> + getTransferJobSettings; + private final PagedCallSettings.Builder< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + ListTransferJobsPagedResponse> + listTransferJobsSettings; + private final UnaryCallSettings.Builder + pauseTransferOperationSettings; + private final UnaryCallSettings.Builder + resumeTransferOperationSettings; + private final UnaryCallSettings.Builder + runTransferJobSettings; + private final OperationCallSettings.Builder< + TransferProto.RunTransferJobRequest, Empty, TransferTypes.TransferOperation> + runTransferJobOperationSettings; + 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); + + getGoogleServiceAccountSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createTransferJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateTransferJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getTransferJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listTransferJobsSettings = PagedCallSettings.newBuilder(LIST_TRANSFER_JOBS_PAGE_STR_FACT); + pauseTransferOperationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + resumeTransferOperationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + runTransferJobSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + runTransferJobOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getGoogleServiceAccountSettings, + createTransferJobSettings, + updateTransferJobSettings, + getTransferJobSettings, + listTransferJobsSettings, + pauseTransferOperationSettings, + resumeTransferOperationSettings, + runTransferJobSettings); + initDefaults(this); + } + + protected Builder(StorageTransferServiceStubSettings settings) { + super(settings); + + getGoogleServiceAccountSettings = settings.getGoogleServiceAccountSettings.toBuilder(); + createTransferJobSettings = settings.createTransferJobSettings.toBuilder(); + updateTransferJobSettings = settings.updateTransferJobSettings.toBuilder(); + getTransferJobSettings = settings.getTransferJobSettings.toBuilder(); + listTransferJobsSettings = settings.listTransferJobsSettings.toBuilder(); + pauseTransferOperationSettings = settings.pauseTransferOperationSettings.toBuilder(); + resumeTransferOperationSettings = settings.resumeTransferOperationSettings.toBuilder(); + runTransferJobSettings = settings.runTransferJobSettings.toBuilder(); + runTransferJobOperationSettings = settings.runTransferJobOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getGoogleServiceAccountSettings, + createTransferJobSettings, + updateTransferJobSettings, + getTransferJobSettings, + listTransferJobsSettings, + pauseTransferOperationSettings, + resumeTransferOperationSettings, + runTransferJobSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getGoogleServiceAccountSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createTransferJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .updateTransferJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getTransferJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listTransferJobsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .pauseTransferOperationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .resumeTransferOperationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .runTransferJobSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .runTransferJobOperationSettings() + .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(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + TransferTypes.TransferOperation.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getGoogleServiceAccount. */ + public UnaryCallSettings.Builder< + TransferProto.GetGoogleServiceAccountRequest, TransferTypes.GoogleServiceAccount> + getGoogleServiceAccountSettings() { + return getGoogleServiceAccountSettings; + } + + /** Returns the builder for the settings used for calls to createTransferJob. */ + public UnaryCallSettings.Builder< + TransferProto.CreateTransferJobRequest, TransferTypes.TransferJob> + createTransferJobSettings() { + return createTransferJobSettings; + } + + /** Returns the builder for the settings used for calls to updateTransferJob. */ + public UnaryCallSettings.Builder< + TransferProto.UpdateTransferJobRequest, TransferTypes.TransferJob> + updateTransferJobSettings() { + return updateTransferJobSettings; + } + + /** Returns the builder for the settings used for calls to getTransferJob. */ + public UnaryCallSettings.Builder + getTransferJobSettings() { + return getTransferJobSettings; + } + + /** Returns the builder for the settings used for calls to listTransferJobs. */ + public PagedCallSettings.Builder< + TransferProto.ListTransferJobsRequest, + TransferProto.ListTransferJobsResponse, + ListTransferJobsPagedResponse> + listTransferJobsSettings() { + return listTransferJobsSettings; + } + + /** Returns the builder for the settings used for calls to pauseTransfer. */ + public UnaryCallSettings.Builder + pauseTransferOperationSettings() { + return pauseTransferOperationSettings; + } + + /** Returns the builder for the settings used for calls to resumeTransfer. */ + public UnaryCallSettings.Builder + resumeTransferOperationSettings() { + return resumeTransferOperationSettings; + } + + /** Returns the builder for the settings used for calls to runTransferJob. */ + public UnaryCallSettings.Builder + runTransferJobSettings() { + return runTransferJobSettings; + } + + /** Returns the builder for the settings used for calls to runTransferJob. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + TransferProto.RunTransferJobRequest, Empty, TransferTypes.TransferOperation> + runTransferJobOperationSettings() { + return runTransferJobOperationSettings; + } + + @Override + public StorageTransferServiceStubSettings build() throws IOException { + return new StorageTransferServiceStubSettings(this); + } + } +} diff --git a/google-cloud-storage-transfer/src/test/java/com/google/storagetransfer/v1/proto/MockStorageTransferService.java b/google-cloud-storage-transfer/src/test/java/com/google/storagetransfer/v1/proto/MockStorageTransferService.java new file mode 100644 index 0000000..8bf90ed --- /dev/null +++ b/google-cloud-storage-transfer/src/test/java/com/google/storagetransfer/v1/proto/MockStorageTransferService.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.storagetransfer.v1.proto; + +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 MockStorageTransferService implements MockGrpcService { + private final MockStorageTransferServiceImpl serviceImpl; + + public MockStorageTransferService() { + serviceImpl = new MockStorageTransferServiceImpl(); + } + + @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-storage-transfer/src/test/java/com/google/storagetransfer/v1/proto/MockStorageTransferServiceImpl.java b/google-cloud-storage-transfer/src/test/java/com/google/storagetransfer/v1/proto/MockStorageTransferServiceImpl.java new file mode 100644 index 0000000..68a382b --- /dev/null +++ b/google-cloud-storage-transfer/src/test/java/com/google/storagetransfer/v1/proto/MockStorageTransferServiceImpl.java @@ -0,0 +1,236 @@ +/* + * 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.storagetransfer.v1.proto; + +import com.google.api.core.BetaApi; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.storagetransfer.v1.proto.StorageTransferServiceGrpc.StorageTransferServiceImplBase; +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 MockStorageTransferServiceImpl extends StorageTransferServiceImplBase { + private List requests; + private Queue responses; + + public MockStorageTransferServiceImpl() { + 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 getGoogleServiceAccount( + TransferProto.GetGoogleServiceAccountRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TransferTypes.GoogleServiceAccount) { + requests.add(request); + responseObserver.onNext(((TransferTypes.GoogleServiceAccount) 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 GetGoogleServiceAccount, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TransferTypes.GoogleServiceAccount.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createTransferJob( + TransferProto.CreateTransferJobRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TransferTypes.TransferJob) { + requests.add(request); + responseObserver.onNext(((TransferTypes.TransferJob) 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 CreateTransferJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TransferTypes.TransferJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateTransferJob( + TransferProto.UpdateTransferJobRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TransferTypes.TransferJob) { + requests.add(request); + responseObserver.onNext(((TransferTypes.TransferJob) 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 UpdateTransferJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TransferTypes.TransferJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getTransferJob( + TransferProto.GetTransferJobRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TransferTypes.TransferJob) { + requests.add(request); + responseObserver.onNext(((TransferTypes.TransferJob) 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 GetTransferJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TransferTypes.TransferJob.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listTransferJobs( + TransferProto.ListTransferJobsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof TransferProto.ListTransferJobsResponse) { + requests.add(request); + responseObserver.onNext(((TransferProto.ListTransferJobsResponse) 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 ListTransferJobs, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + TransferProto.ListTransferJobsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void pauseTransferOperation( + TransferProto.PauseTransferOperationRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method PauseTransferOperation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void resumeTransferOperation( + TransferProto.ResumeTransferOperationRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ResumeTransferOperation, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void runTransferJob( + TransferProto.RunTransferJobRequest 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 RunTransferJob, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-storage-transfer/src/test/java/com/google/storagetransfer/v1/proto/StorageTransferServiceClientTest.java b/google-cloud-storage-transfer/src/test/java/com/google/storagetransfer/v1/proto/StorageTransferServiceClientTest.java new file mode 100644 index 0000000..9d8511f --- /dev/null +++ b/google-cloud-storage-transfer/src/test/java/com/google/storagetransfer/v1/proto/StorageTransferServiceClientTest.java @@ -0,0 +1,492 @@ +/* + * 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.storagetransfer.v1.proto; + +import static com.google.storagetransfer.v1.proto.StorageTransferServiceClient.ListTransferJobsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +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 StorageTransferServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockStorageTransferService mockStorageTransferService; + private LocalChannelProvider channelProvider; + private StorageTransferServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockStorageTransferService = new MockStorageTransferService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockStorageTransferService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + StorageTransferServiceSettings settings = + StorageTransferServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = StorageTransferServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getGoogleServiceAccountTest() throws Exception { + TransferTypes.GoogleServiceAccount expectedResponse = + TransferTypes.GoogleServiceAccount.newBuilder() + .setAccountEmail("accountEmail1067197807") + .setSubjectId("subjectId258589543") + .build(); + mockStorageTransferService.addResponse(expectedResponse); + + TransferProto.GetGoogleServiceAccountRequest request = + TransferProto.GetGoogleServiceAccountRequest.newBuilder() + .setProjectId("projectId-894832108") + .build(); + + TransferTypes.GoogleServiceAccount actualResponse = client.getGoogleServiceAccount(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TransferProto.GetGoogleServiceAccountRequest actualRequest = + ((TransferProto.GetGoogleServiceAccountRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getProjectId(), actualRequest.getProjectId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getGoogleServiceAccountExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageTransferService.addException(exception); + + try { + TransferProto.GetGoogleServiceAccountRequest request = + TransferProto.GetGoogleServiceAccountRequest.newBuilder() + .setProjectId("projectId-894832108") + .build(); + client.getGoogleServiceAccount(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createTransferJobTest() throws Exception { + TransferTypes.TransferJob expectedResponse = + TransferTypes.TransferJob.newBuilder() + .setName("name3373707") + .setDescription("description-1724546052") + .setProjectId("projectId-894832108") + .setTransferSpec(TransferTypes.TransferSpec.newBuilder().build()) + .setNotificationConfig(TransferTypes.NotificationConfig.newBuilder().build()) + .setSchedule(TransferTypes.Schedule.newBuilder().build()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastModificationTime(Timestamp.newBuilder().build()) + .setDeletionTime(Timestamp.newBuilder().build()) + .setLatestOperationName("latestOperationName-1244328885") + .build(); + mockStorageTransferService.addResponse(expectedResponse); + + TransferProto.CreateTransferJobRequest request = + TransferProto.CreateTransferJobRequest.newBuilder() + .setTransferJob(TransferTypes.TransferJob.newBuilder().build()) + .build(); + + TransferTypes.TransferJob actualResponse = client.createTransferJob(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TransferProto.CreateTransferJobRequest actualRequest = + ((TransferProto.CreateTransferJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getTransferJob(), actualRequest.getTransferJob()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createTransferJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageTransferService.addException(exception); + + try { + TransferProto.CreateTransferJobRequest request = + TransferProto.CreateTransferJobRequest.newBuilder() + .setTransferJob(TransferTypes.TransferJob.newBuilder().build()) + .build(); + client.createTransferJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateTransferJobTest() throws Exception { + TransferTypes.TransferJob expectedResponse = + TransferTypes.TransferJob.newBuilder() + .setName("name3373707") + .setDescription("description-1724546052") + .setProjectId("projectId-894832108") + .setTransferSpec(TransferTypes.TransferSpec.newBuilder().build()) + .setNotificationConfig(TransferTypes.NotificationConfig.newBuilder().build()) + .setSchedule(TransferTypes.Schedule.newBuilder().build()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastModificationTime(Timestamp.newBuilder().build()) + .setDeletionTime(Timestamp.newBuilder().build()) + .setLatestOperationName("latestOperationName-1244328885") + .build(); + mockStorageTransferService.addResponse(expectedResponse); + + TransferProto.UpdateTransferJobRequest request = + TransferProto.UpdateTransferJobRequest.newBuilder() + .setJobName("jobName-1438096408") + .setProjectId("projectId-894832108") + .setTransferJob(TransferTypes.TransferJob.newBuilder().build()) + .setUpdateTransferJobFieldMask(FieldMask.newBuilder().build()) + .build(); + + TransferTypes.TransferJob actualResponse = client.updateTransferJob(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TransferProto.UpdateTransferJobRequest actualRequest = + ((TransferProto.UpdateTransferJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getJobName(), actualRequest.getJobName()); + Assert.assertEquals(request.getProjectId(), actualRequest.getProjectId()); + Assert.assertEquals(request.getTransferJob(), actualRequest.getTransferJob()); + Assert.assertEquals( + request.getUpdateTransferJobFieldMask(), actualRequest.getUpdateTransferJobFieldMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateTransferJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageTransferService.addException(exception); + + try { + TransferProto.UpdateTransferJobRequest request = + TransferProto.UpdateTransferJobRequest.newBuilder() + .setJobName("jobName-1438096408") + .setProjectId("projectId-894832108") + .setTransferJob(TransferTypes.TransferJob.newBuilder().build()) + .setUpdateTransferJobFieldMask(FieldMask.newBuilder().build()) + .build(); + client.updateTransferJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getTransferJobTest() throws Exception { + TransferTypes.TransferJob expectedResponse = + TransferTypes.TransferJob.newBuilder() + .setName("name3373707") + .setDescription("description-1724546052") + .setProjectId("projectId-894832108") + .setTransferSpec(TransferTypes.TransferSpec.newBuilder().build()) + .setNotificationConfig(TransferTypes.NotificationConfig.newBuilder().build()) + .setSchedule(TransferTypes.Schedule.newBuilder().build()) + .setCreationTime(Timestamp.newBuilder().build()) + .setLastModificationTime(Timestamp.newBuilder().build()) + .setDeletionTime(Timestamp.newBuilder().build()) + .setLatestOperationName("latestOperationName-1244328885") + .build(); + mockStorageTransferService.addResponse(expectedResponse); + + TransferProto.GetTransferJobRequest request = + TransferProto.GetTransferJobRequest.newBuilder() + .setJobName("jobName-1438096408") + .setProjectId("projectId-894832108") + .build(); + + TransferTypes.TransferJob actualResponse = client.getTransferJob(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TransferProto.GetTransferJobRequest actualRequest = + ((TransferProto.GetTransferJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getJobName(), actualRequest.getJobName()); + Assert.assertEquals(request.getProjectId(), actualRequest.getProjectId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getTransferJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageTransferService.addException(exception); + + try { + TransferProto.GetTransferJobRequest request = + TransferProto.GetTransferJobRequest.newBuilder() + .setJobName("jobName-1438096408") + .setProjectId("projectId-894832108") + .build(); + client.getTransferJob(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTransferJobsTest() throws Exception { + TransferTypes.TransferJob responsesElement = TransferTypes.TransferJob.newBuilder().build(); + TransferProto.ListTransferJobsResponse expectedResponse = + TransferProto.ListTransferJobsResponse.newBuilder() + .setNextPageToken("") + .addAllTransferJobs(Arrays.asList(responsesElement)) + .build(); + mockStorageTransferService.addResponse(expectedResponse); + + TransferProto.ListTransferJobsRequest request = + TransferProto.ListTransferJobsRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListTransferJobsPagedResponse pagedListResponse = client.listTransferJobs(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTransferJobsList().get(0), resources.get(0)); + + List actualRequests = mockStorageTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TransferProto.ListTransferJobsRequest actualRequest = + ((TransferProto.ListTransferJobsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTransferJobsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageTransferService.addException(exception); + + try { + TransferProto.ListTransferJobsRequest request = + TransferProto.ListTransferJobsRequest.newBuilder() + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listTransferJobs(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void pauseTransferOperationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockStorageTransferService.addResponse(expectedResponse); + + TransferProto.PauseTransferOperationRequest request = + TransferProto.PauseTransferOperationRequest.newBuilder().setName("name3373707").build(); + + client.pauseTransferOperation(request); + + List actualRequests = mockStorageTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TransferProto.PauseTransferOperationRequest actualRequest = + ((TransferProto.PauseTransferOperationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void pauseTransferOperationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageTransferService.addException(exception); + + try { + TransferProto.PauseTransferOperationRequest request = + TransferProto.PauseTransferOperationRequest.newBuilder().setName("name3373707").build(); + client.pauseTransferOperation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resumeTransferOperationTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockStorageTransferService.addResponse(expectedResponse); + + TransferProto.ResumeTransferOperationRequest request = + TransferProto.ResumeTransferOperationRequest.newBuilder().setName("name3373707").build(); + + client.resumeTransferOperation(request); + + List actualRequests = mockStorageTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TransferProto.ResumeTransferOperationRequest actualRequest = + ((TransferProto.ResumeTransferOperationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resumeTransferOperationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageTransferService.addException(exception); + + try { + TransferProto.ResumeTransferOperationRequest request = + TransferProto.ResumeTransferOperationRequest.newBuilder().setName("name3373707").build(); + client.resumeTransferOperation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void runTransferJobTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("runTransferJobTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStorageTransferService.addResponse(resultOperation); + + TransferProto.RunTransferJobRequest request = + TransferProto.RunTransferJobRequest.newBuilder() + .setJobName("jobName-1438096408") + .setProjectId("projectId-894832108") + .build(); + + client.runTransferJobAsync(request).get(); + + List actualRequests = mockStorageTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TransferProto.RunTransferJobRequest actualRequest = + ((TransferProto.RunTransferJobRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getJobName(), actualRequest.getJobName()); + Assert.assertEquals(request.getProjectId(), actualRequest.getProjectId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void runTransferJobExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageTransferService.addException(exception); + + try { + TransferProto.RunTransferJobRequest request = + TransferProto.RunTransferJobRequest.newBuilder() + .setJobName("jobName-1438096408") + .setProjectId("projectId-894832108") + .build(); + client.runTransferJobAsync(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-storage-transfer-v1/pom.xml b/grpc-google-cloud-storage-transfer-v1/pom.xml new file mode 100644 index 0000000..8603e57 --- /dev/null +++ b/grpc-google-cloud-storage-transfer-v1/pom.xml @@ -0,0 +1,69 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-storage-transfer-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-storage-transfer-v1 + GRPC library for google-cloud-storage-transfer + + com.google.cloud + google-cloud-storage-transfer-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-storage-transfer-v1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-storage-transfer-v1/src/main/java/com/google/storagetransfer/v1/proto/StorageTransferServiceGrpc.java b/grpc-google-cloud-storage-transfer-v1/src/main/java/com/google/storagetransfer/v1/proto/StorageTransferServiceGrpc.java new file mode 100644 index 0000000..09885be --- /dev/null +++ b/grpc-google-cloud-storage-transfer-v1/src/main/java/com/google/storagetransfer/v1/proto/StorageTransferServiceGrpc.java @@ -0,0 +1,1329 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.storagetransfer.v1.proto; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Storage Transfer Service and its protos.
+ * Transfers data between between Google Cloud Storage buckets or from a data
+ * source external to Google to a Cloud Storage bucket.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/storagetransfer/v1/transfer.proto") +public final class StorageTransferServiceGrpc { + + private StorageTransferServiceGrpc() {} + + public static final String SERVICE_NAME = "google.storagetransfer.v1.StorageTransferService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest, + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount> + getGetGoogleServiceAccountMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetGoogleServiceAccount", + requestType = + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest.class, + responseType = com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest, + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount> + getGetGoogleServiceAccountMethod() { + io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest, + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount> + getGetGoogleServiceAccountMethod; + if ((getGetGoogleServiceAccountMethod = + StorageTransferServiceGrpc.getGetGoogleServiceAccountMethod) + == null) { + synchronized (StorageTransferServiceGrpc.class) { + if ((getGetGoogleServiceAccountMethod = + StorageTransferServiceGrpc.getGetGoogleServiceAccountMethod) + == null) { + StorageTransferServiceGrpc.getGetGoogleServiceAccountMethod = + getGetGoogleServiceAccountMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetGoogleServiceAccount")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferProto + .GetGoogleServiceAccountRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount + .getDefaultInstance())) + .setSchemaDescriptor( + new StorageTransferServiceMethodDescriptorSupplier( + "GetGoogleServiceAccount")) + .build(); + } + } + } + return getGetGoogleServiceAccountMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + getCreateTransferJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateTransferJob", + requestType = + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest.class, + responseType = com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + getCreateTransferJobMethod() { + io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + getCreateTransferJobMethod; + if ((getCreateTransferJobMethod = StorageTransferServiceGrpc.getCreateTransferJobMethod) + == null) { + synchronized (StorageTransferServiceGrpc.class) { + if ((getCreateTransferJobMethod = StorageTransferServiceGrpc.getCreateTransferJobMethod) + == null) { + StorageTransferServiceGrpc.getCreateTransferJobMethod = + getCreateTransferJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTransferJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferProto + .CreateTransferJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob + .getDefaultInstance())) + .setSchemaDescriptor( + new StorageTransferServiceMethodDescriptorSupplier("CreateTransferJob")) + .build(); + } + } + } + return getCreateTransferJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + getUpdateTransferJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateTransferJob", + requestType = + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest.class, + responseType = com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + getUpdateTransferJobMethod() { + io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + getUpdateTransferJobMethod; + if ((getUpdateTransferJobMethod = StorageTransferServiceGrpc.getUpdateTransferJobMethod) + == null) { + synchronized (StorageTransferServiceGrpc.class) { + if ((getUpdateTransferJobMethod = StorageTransferServiceGrpc.getUpdateTransferJobMethod) + == null) { + StorageTransferServiceGrpc.getUpdateTransferJobMethod = + getUpdateTransferJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateTransferJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferProto + .UpdateTransferJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob + .getDefaultInstance())) + .setSchemaDescriptor( + new StorageTransferServiceMethodDescriptorSupplier("UpdateTransferJob")) + .build(); + } + } + } + return getUpdateTransferJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + getGetTransferJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetTransferJob", + requestType = com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest.class, + responseType = com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + getGetTransferJobMethod() { + io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + getGetTransferJobMethod; + if ((getGetTransferJobMethod = StorageTransferServiceGrpc.getGetTransferJobMethod) == null) { + synchronized (StorageTransferServiceGrpc.class) { + if ((getGetTransferJobMethod = StorageTransferServiceGrpc.getGetTransferJobMethod) + == null) { + StorageTransferServiceGrpc.getGetTransferJobMethod = + getGetTransferJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetTransferJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferProto + .GetTransferJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob + .getDefaultInstance())) + .setSchemaDescriptor( + new StorageTransferServiceMethodDescriptorSupplier("GetTransferJob")) + .build(); + } + } + } + return getGetTransferJobMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest, + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse> + getListTransferJobsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTransferJobs", + requestType = com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest.class, + responseType = + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest, + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse> + getListTransferJobsMethod() { + io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest, + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse> + getListTransferJobsMethod; + if ((getListTransferJobsMethod = StorageTransferServiceGrpc.getListTransferJobsMethod) + == null) { + synchronized (StorageTransferServiceGrpc.class) { + if ((getListTransferJobsMethod = StorageTransferServiceGrpc.getListTransferJobsMethod) + == null) { + StorageTransferServiceGrpc.getListTransferJobsMethod = + getListTransferJobsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListTransferJobs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferProto + .ListTransferJobsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferProto + .ListTransferJobsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new StorageTransferServiceMethodDescriptorSupplier("ListTransferJobs")) + .build(); + } + } + } + return getListTransferJobsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest, + com.google.protobuf.Empty> + getPauseTransferOperationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PauseTransferOperation", + requestType = + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest, + com.google.protobuf.Empty> + getPauseTransferOperationMethod() { + io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest, + com.google.protobuf.Empty> + getPauseTransferOperationMethod; + if ((getPauseTransferOperationMethod = + StorageTransferServiceGrpc.getPauseTransferOperationMethod) + == null) { + synchronized (StorageTransferServiceGrpc.class) { + if ((getPauseTransferOperationMethod = + StorageTransferServiceGrpc.getPauseTransferOperationMethod) + == null) { + StorageTransferServiceGrpc.getPauseTransferOperationMethod = + getPauseTransferOperationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "PauseTransferOperation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferProto + .PauseTransferOperationRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new StorageTransferServiceMethodDescriptorSupplier( + "PauseTransferOperation")) + .build(); + } + } + } + return getPauseTransferOperationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest, + com.google.protobuf.Empty> + getResumeTransferOperationMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ResumeTransferOperation", + requestType = + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest, + com.google.protobuf.Empty> + getResumeTransferOperationMethod() { + io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest, + com.google.protobuf.Empty> + getResumeTransferOperationMethod; + if ((getResumeTransferOperationMethod = + StorageTransferServiceGrpc.getResumeTransferOperationMethod) + == null) { + synchronized (StorageTransferServiceGrpc.class) { + if ((getResumeTransferOperationMethod = + StorageTransferServiceGrpc.getResumeTransferOperationMethod) + == null) { + StorageTransferServiceGrpc.getResumeTransferOperationMethod = + getResumeTransferOperationMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ResumeTransferOperation")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferProto + .ResumeTransferOperationRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new StorageTransferServiceMethodDescriptorSupplier( + "ResumeTransferOperation")) + .build(); + } + } + } + return getResumeTransferOperationMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest, + com.google.longrunning.Operation> + getRunTransferJobMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "RunTransferJob", + requestType = com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest, + com.google.longrunning.Operation> + getRunTransferJobMethod() { + io.grpc.MethodDescriptor< + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest, + com.google.longrunning.Operation> + getRunTransferJobMethod; + if ((getRunTransferJobMethod = StorageTransferServiceGrpc.getRunTransferJobMethod) == null) { + synchronized (StorageTransferServiceGrpc.class) { + if ((getRunTransferJobMethod = StorageTransferServiceGrpc.getRunTransferJobMethod) + == null) { + StorageTransferServiceGrpc.getRunTransferJobMethod = + getRunTransferJobMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RunTransferJob")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storagetransfer.v1.proto.TransferProto + .RunTransferJobRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StorageTransferServiceMethodDescriptorSupplier("RunTransferJob")) + .build(); + } + } + } + return getRunTransferJobMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static StorageTransferServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public StorageTransferServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StorageTransferServiceStub(channel, callOptions); + } + }; + return StorageTransferServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static StorageTransferServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public StorageTransferServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StorageTransferServiceBlockingStub(channel, callOptions); + } + }; + return StorageTransferServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static StorageTransferServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public StorageTransferServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StorageTransferServiceFutureStub(channel, callOptions); + } + }; + return StorageTransferServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Storage Transfer Service and its protos.
+   * Transfers data between between Google Cloud Storage buckets or from a data
+   * source external to Google to a Cloud Storage bucket.
+   * 
+ */ + public abstract static class StorageTransferServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Returns the Google service account that is used by Storage Transfer
+     * Service to access buckets in the project where transfers
+     * run or in other projects. Each Google service account is associated
+     * with one Google Cloud Platform Console project. Users
+     * should add this service account to the Google Cloud Storage bucket
+     * ACLs to grant access to Storage Transfer Service. This service
+     * account is created and owned by Storage Transfer Service and can
+     * only be used by Storage Transfer Service.
+     * 
+ */ + public void getGoogleServiceAccount( + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest request, + io.grpc.stub.StreamObserver< + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetGoogleServiceAccountMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a transfer job that runs periodically.
+     * 
+ */ + public void createTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateTransferJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a transfer job. Updating a job's transfer spec does not affect
+     * transfer operations that are running already.
+     * **Note:** The job's [status][google.storagetransfer.v1.TransferJob.status]
+     * field can be modified using this RPC (for example, to set a job's status to
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED],
+     * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], or
+     * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED]).
+     * 
+ */ + public void updateTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateTransferJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a transfer job.
+     * 
+ */ + public void getTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetTransferJobMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists transfer jobs.
+     * 
+ */ + public void listTransferJobs( + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest request, + io.grpc.stub.StreamObserver< + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListTransferJobsMethod(), responseObserver); + } + + /** + * + * + *
+     * Pauses a transfer operation.
+     * 
+ */ + public void pauseTransferOperation( + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPauseTransferOperationMethod(), responseObserver); + } + + /** + * + * + *
+     * Resumes a transfer operation that is paused.
+     * 
+ */ + public void resumeTransferOperation( + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getResumeTransferOperationMethod(), responseObserver); + } + + /** + * + * + *
+     * Attempts to start a new TransferOperation for the current TransferJob. A
+     * TransferJob has a maximum of one active TransferOperation. If this method
+     * is called while a TransferOperation is active, an error wil be returned.
+     * 
+ */ + public void runTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRunTransferJobMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetGoogleServiceAccountMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storagetransfer.v1.proto.TransferProto + .GetGoogleServiceAccountRequest, + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount>( + this, METHODID_GET_GOOGLE_SERVICE_ACCOUNT))) + .addMethod( + getCreateTransferJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob>( + this, METHODID_CREATE_TRANSFER_JOB))) + .addMethod( + getUpdateTransferJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob>( + this, METHODID_UPDATE_TRANSFER_JOB))) + .addMethod( + getGetTransferJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob>( + this, METHODID_GET_TRANSFER_JOB))) + .addMethod( + getListTransferJobsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest, + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse>( + this, METHODID_LIST_TRANSFER_JOBS))) + .addMethod( + getPauseTransferOperationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storagetransfer.v1.proto.TransferProto + .PauseTransferOperationRequest, + com.google.protobuf.Empty>(this, METHODID_PAUSE_TRANSFER_OPERATION))) + .addMethod( + getResumeTransferOperationMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storagetransfer.v1.proto.TransferProto + .ResumeTransferOperationRequest, + com.google.protobuf.Empty>(this, METHODID_RESUME_TRANSFER_OPERATION))) + .addMethod( + getRunTransferJobMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest, + com.google.longrunning.Operation>(this, METHODID_RUN_TRANSFER_JOB))) + .build(); + } + } + + /** + * + * + *
+   * Storage Transfer Service and its protos.
+   * Transfers data between between Google Cloud Storage buckets or from a data
+   * source external to Google to a Cloud Storage bucket.
+   * 
+ */ + public static final class StorageTransferServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private StorageTransferServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StorageTransferServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StorageTransferServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the Google service account that is used by Storage Transfer
+     * Service to access buckets in the project where transfers
+     * run or in other projects. Each Google service account is associated
+     * with one Google Cloud Platform Console project. Users
+     * should add this service account to the Google Cloud Storage bucket
+     * ACLs to grant access to Storage Transfer Service. This service
+     * account is created and owned by Storage Transfer Service and can
+     * only be used by Storage Transfer Service.
+     * 
+ */ + public void getGoogleServiceAccount( + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest request, + io.grpc.stub.StreamObserver< + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetGoogleServiceAccountMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a transfer job that runs periodically.
+     * 
+ */ + public void createTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateTransferJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a transfer job. Updating a job's transfer spec does not affect
+     * transfer operations that are running already.
+     * **Note:** The job's [status][google.storagetransfer.v1.TransferJob.status]
+     * field can be modified using this RPC (for example, to set a job's status to
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED],
+     * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], or
+     * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED]).
+     * 
+ */ + public void updateTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateTransferJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a transfer job.
+     * 
+ */ + public void getTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetTransferJobMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists transfer jobs.
+     * 
+ */ + public void listTransferJobs( + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest request, + io.grpc.stub.StreamObserver< + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListTransferJobsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Pauses a transfer operation.
+     * 
+ */ + public void pauseTransferOperation( + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPauseTransferOperationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Resumes a transfer operation that is paused.
+     * 
+ */ + public void resumeTransferOperation( + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResumeTransferOperationMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Attempts to start a new TransferOperation for the current TransferJob. A
+     * TransferJob has a maximum of one active TransferOperation. If this method
+     * is called while a TransferOperation is active, an error wil be returned.
+     * 
+ */ + public void runTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRunTransferJobMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Storage Transfer Service and its protos.
+   * Transfers data between between Google Cloud Storage buckets or from a data
+   * source external to Google to a Cloud Storage bucket.
+   * 
+ */ + public static final class StorageTransferServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private StorageTransferServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StorageTransferServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StorageTransferServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the Google service account that is used by Storage Transfer
+     * Service to access buckets in the project where transfers
+     * run or in other projects. Each Google service account is associated
+     * with one Google Cloud Platform Console project. Users
+     * should add this service account to the Google Cloud Storage bucket
+     * ACLs to grant access to Storage Transfer Service. This service
+     * account is created and owned by Storage Transfer Service and can
+     * only be used by Storage Transfer Service.
+     * 
+ */ + public com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount + getGoogleServiceAccount( + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetGoogleServiceAccountMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a transfer job that runs periodically.
+     * 
+ */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob createTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateTransferJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a transfer job. Updating a job's transfer spec does not affect
+     * transfer operations that are running already.
+     * **Note:** The job's [status][google.storagetransfer.v1.TransferJob.status]
+     * field can be modified using this RPC (for example, to set a job's status to
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED],
+     * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], or
+     * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED]).
+     * 
+ */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob updateTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateTransferJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a transfer job.
+     * 
+ */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob getTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetTransferJobMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists transfer jobs.
+     * 
+ */ + public com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + listTransferJobs( + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListTransferJobsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Pauses a transfer operation.
+     * 
+ */ + public com.google.protobuf.Empty pauseTransferOperation( + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPauseTransferOperationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Resumes a transfer operation that is paused.
+     * 
+ */ + public com.google.protobuf.Empty resumeTransferOperation( + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResumeTransferOperationMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Attempts to start a new TransferOperation for the current TransferJob. A
+     * TransferJob has a maximum of one active TransferOperation. If this method
+     * is called while a TransferOperation is active, an error wil be returned.
+     * 
+ */ + public com.google.longrunning.Operation runTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRunTransferJobMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Storage Transfer Service and its protos.
+   * Transfers data between between Google Cloud Storage buckets or from a data
+   * source external to Google to a Cloud Storage bucket.
+   * 
+ */ + public static final class StorageTransferServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private StorageTransferServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StorageTransferServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StorageTransferServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns the Google service account that is used by Storage Transfer
+     * Service to access buckets in the project where transfers
+     * run or in other projects. Each Google service account is associated
+     * with one Google Cloud Platform Console project. Users
+     * should add this service account to the Google Cloud Storage bucket
+     * ACLs to grant access to Storage Transfer Service. This service
+     * account is created and owned by Storage Transfer Service and can
+     * only be used by Storage Transfer Service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount> + getGoogleServiceAccount( + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetGoogleServiceAccountMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a transfer job that runs periodically.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + createTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateTransferJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a transfer job. Updating a job's transfer spec does not affect
+     * transfer operations that are running already.
+     * **Note:** The job's [status][google.storagetransfer.v1.TransferJob.status]
+     * field can be modified using this RPC (for example, to set a job's status to
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED],
+     * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], or
+     * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED]).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + updateTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateTransferJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a transfer job.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + getTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetTransferJobMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists transfer jobs.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse> + listTransferJobs( + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListTransferJobsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Pauses a transfer operation.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + pauseTransferOperation( + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPauseTransferOperationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Resumes a transfer operation that is paused.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + resumeTransferOperation( + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getResumeTransferOperationMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Attempts to start a new TransferOperation for the current TransferJob. A
+     * TransferJob has a maximum of one active TransferOperation. If this method
+     * is called while a TransferOperation is active, an error wil be returned.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + runTransferJob( + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getRunTransferJobMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_GOOGLE_SERVICE_ACCOUNT = 0; + private static final int METHODID_CREATE_TRANSFER_JOB = 1; + private static final int METHODID_UPDATE_TRANSFER_JOB = 2; + private static final int METHODID_GET_TRANSFER_JOB = 3; + private static final int METHODID_LIST_TRANSFER_JOBS = 4; + private static final int METHODID_PAUSE_TRANSFER_OPERATION = 5; + private static final int METHODID_RESUME_TRANSFER_OPERATION = 6; + private static final int METHODID_RUN_TRANSFER_JOB = 7; + + 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 StorageTransferServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(StorageTransferServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_GOOGLE_SERVICE_ACCOUNT: + serviceImpl.getGoogleServiceAccount( + (com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount>) + responseObserver); + break; + case METHODID_CREATE_TRANSFER_JOB: + serviceImpl.createTransferJob( + (com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest) request, + (io.grpc.stub.StreamObserver< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob>) + responseObserver); + break; + case METHODID_UPDATE_TRANSFER_JOB: + serviceImpl.updateTransferJob( + (com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest) request, + (io.grpc.stub.StreamObserver< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob>) + responseObserver); + break; + case METHODID_GET_TRANSFER_JOB: + serviceImpl.getTransferJob( + (com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest) request, + (io.grpc.stub.StreamObserver< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob>) + responseObserver); + break; + case METHODID_LIST_TRANSFER_JOBS: + serviceImpl.listTransferJobs( + (com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse>) + responseObserver); + break; + case METHODID_PAUSE_TRANSFER_OPERATION: + serviceImpl.pauseTransferOperation( + (com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESUME_TRANSFER_OPERATION: + serviceImpl.resumeTransferOperation( + (com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RUN_TRANSFER_JOB: + serviceImpl.runTransferJob( + (com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest) 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 StorageTransferServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + StorageTransferServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("StorageTransferService"); + } + } + + private static final class StorageTransferServiceFileDescriptorSupplier + extends StorageTransferServiceBaseDescriptorSupplier { + StorageTransferServiceFileDescriptorSupplier() {} + } + + private static final class StorageTransferServiceMethodDescriptorSupplier + extends StorageTransferServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + StorageTransferServiceMethodDescriptorSupplier(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 (StorageTransferServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new StorageTransferServiceFileDescriptorSupplier()) + .addMethod(getGetGoogleServiceAccountMethod()) + .addMethod(getCreateTransferJobMethod()) + .addMethod(getUpdateTransferJobMethod()) + .addMethod(getGetTransferJobMethod()) + .addMethod(getListTransferJobsMethod()) + .addMethod(getPauseTransferOperationMethod()) + .addMethod(getResumeTransferOperationMethod()) + .addMethod(getRunTransferJobMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java.header b/java.header new file mode 100644 index 0000000..d0970ba --- /dev/null +++ b/java.header @@ -0,0 +1,15 @@ +^/\*$ +^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)$ +^ \*$ +^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ +^ \* you may not use this file except in compliance with the License\.$ +^ \* You may obtain a copy of the License at$ +^ \*$ +^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ +^ \*$ +^ \* Unless required by applicable law or agreed to in writing, software$ +^ \* distributed under the License is distributed on an "AS IS" BASIS,$ +^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$ +^ \* See the License for the specific language governing permissions and$ +^ \* limitations under the License\.$ +^ \*/$ diff --git a/license-checks.xml b/license-checks.xml new file mode 100644 index 0000000..6597fce --- /dev/null +++ b/license-checks.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/owlbot.py b/owlbot.py new file mode 100644 index 0000000..7724346 --- /dev/null +++ b/owlbot.py @@ -0,0 +1,24 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import synthtool as s +from synthtool.languages import java + + +for library in s.get_staging_dirs(): + # put any special-case replacements here + s.move(library) + +s.remove_staging_dirs() +java.common_templates() \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..bb8d3e7 --- /dev/null +++ b/pom.xml @@ -0,0 +1,188 @@ + + + 4.0.0 + com.google.cloud + google-cloud-storage-transfer-parent + pom + 0.0.1-SNAPSHOT + Google Storage Transfer Service Parent + https://github.com/googleapis/java-storage-transfer + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 0.12.0 + + + + + chingor + Jeff Ching + chingor@google.com + Google + + Developer + + + + neenushaji + Neenu Shaji + neenushaji@google.com + Google + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-storage-transfer.git + scm:git:git@github.com:googleapis/java-storage-transfer.git + https://github.com/googleapis/java-storage-transfer + HEAD + + + https://github.com/googleapis/java-storage-transfer/issues + GitHub Issues + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + UTF-8 + UTF-8 + github + google-cloud-storage-transfer-parent + + + + + + com.google.cloud + google-cloud-storage-transfer + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-storage-transfer-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-storage-transfer-v1 + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 1.3.0 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-storage-transfer + grpc-google-cloud-storage-transfer-v1 + proto-google-cloud-storage-transfer-v1 + google-cloud-storage-transfer-bom + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.1.1 + + + + index + dependency-info + team + ci-management + issue-management + licenses + scm + dependency-management + distribution-management + summary + modules + + + + + true + ${site.installationModule} + jar + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + html + + aggregate + javadoc + + + + + none + protected + true + ${project.build.directory}/javadoc + + + Test helpers packages + com.google.cloud.testing + + + SPI packages + com.google.cloud.spi* + + + + + https://grpc.io/grpc-java/javadoc/ + https://developers.google.com/protocol-buffers/docs/reference/java/ + https://googleapis.dev/java/google-auth-library/latest/ + https://googleapis.dev/java/gax/latest/ + https://googleapis.github.io/api-common-java/${google.api-common.version}/apidocs/ + + + + + + diff --git a/proto-google-cloud-storage-transfer-v1/clirr-ignored-differences.xml b/proto-google-cloud-storage-transfer-v1/clirr-ignored-differences.xml new file mode 100644 index 0000000..70e35c1 --- /dev/null +++ b/proto-google-cloud-storage-transfer-v1/clirr-ignored-differences.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/proto-google-cloud-storage-transfer-v1/pom.xml b/proto-google-cloud-storage-transfer-v1/pom.xml new file mode 100644 index 0000000..0cae2a5 --- /dev/null +++ b/proto-google-cloud-storage-transfer-v1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-storage-transfer-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-storage-transfer-v1 + Proto library for google-cloud-storage-transfer + + com.google.cloud + google-cloud-storage-transfer-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-storage-transfer-v1/src/main/java/com/google/storagetransfer/v1/proto/TransferProto.java b/proto-google-cloud-storage-transfer-v1/src/main/java/com/google/storagetransfer/v1/proto/TransferProto.java new file mode 100644 index 0000000..db56abc --- /dev/null +++ b/proto-google-cloud-storage-transfer-v1/src/main/java/com/google/storagetransfer/v1/proto/TransferProto.java @@ -0,0 +1,9098 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/storagetransfer/v1/transfer.proto + +package com.google.storagetransfer.v1.proto; + +public final class TransferProto { + private TransferProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public interface GetGoogleServiceAccountRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.GetGoogleServiceAccountRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that the
+     * Google service account is associated with.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that the
+     * Google service account is associated with.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + } + /** + * + * + *
+   * Request passed to GetGoogleServiceAccount.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.GetGoogleServiceAccountRequest} + */ + public static final class GetGoogleServiceAccountRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.GetGoogleServiceAccountRequest) + GetGoogleServiceAccountRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetGoogleServiceAccountRequest.newBuilder() to construct. + private GetGoogleServiceAccountRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetGoogleServiceAccountRequest() { + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetGoogleServiceAccountRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetGoogleServiceAccountRequest( + 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(); + + projectId_ = 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.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_GetGoogleServiceAccountRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_GetGoogleServiceAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + .class, + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + .Builder.class); + } + + public static final int PROJECT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object projectId_; + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that the
+     * Google service account is associated with.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that the
+     * Google service account is associated with.
+     * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = 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 (!getProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectId_); + } + 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.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest other = + (com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest) obj; + + if (!getProjectId().equals(other.getProjectId())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + 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.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + 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.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + 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.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + 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.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request passed to GetGoogleServiceAccount.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.GetGoogleServiceAccountRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.GetGoogleServiceAccountRequest) + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_GetGoogleServiceAccountRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_GetGoogleServiceAccountRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + .class, + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + .Builder.class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest.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(); + projectId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_GetGoogleServiceAccountRequest_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + build() { + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + buildPartial() { + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest result = + new com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest( + this); + result.projectId_ = projectId_; + 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.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest other) { + if (other + == com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + .getDefaultInstance()) return this; + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + 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.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that the
+       * Google service account is associated with.
+       * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that the
+       * Google service account is associated with.
+       * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that the
+       * Google service account is associated with.
+       * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that the
+       * Google service account is associated with.
+       * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that the
+       * Google service account is associated with.
+       * 
+ * + * string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = 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.storagetransfer.v1.GetGoogleServiceAccountRequest) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.GetGoogleServiceAccountRequest) + private static final com.google.storagetransfer.v1.proto.TransferProto + .GetGoogleServiceAccountRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest(); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetGoogleServiceAccountRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetGoogleServiceAccountRequest(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.storagetransfer.v1.proto.TransferProto.GetGoogleServiceAccountRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CreateTransferJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.CreateTransferJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The job to create.
+     * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the transferJob field is set. + */ + boolean hasTransferJob(); + /** + * + * + *
+     * Required. The job to create.
+     * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The transferJob. + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob getTransferJob(); + /** + * + * + *
+     * Required. The job to create.
+     * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder + getTransferJobOrBuilder(); + } + /** + * + * + *
+   * Request passed to CreateTransferJob.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.CreateTransferJobRequest} + */ + public static final class CreateTransferJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.CreateTransferJobRequest) + CreateTransferJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTransferJobRequest.newBuilder() to construct. + private CreateTransferJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTransferJobRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateTransferJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateTransferJobRequest( + 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.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder subBuilder = + null; + if (transferJob_ != null) { + subBuilder = transferJob_.toBuilder(); + } + transferJob_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transferJob_); + transferJob_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_CreateTransferJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_CreateTransferJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest.class, + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest.Builder + .class); + } + + public static final int TRANSFER_JOB_FIELD_NUMBER = 1; + private com.google.storagetransfer.v1.proto.TransferTypes.TransferJob transferJob_; + /** + * + * + *
+     * Required. The job to create.
+     * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the transferJob field is set. + */ + @java.lang.Override + public boolean hasTransferJob() { + return transferJob_ != null; + } + /** + * + * + *
+     * Required. The job to create.
+     * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The transferJob. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob getTransferJob() { + return transferJob_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.getDefaultInstance() + : transferJob_; + } + /** + * + * + *
+     * Required. The job to create.
+     * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder + getTransferJobOrBuilder() { + return getTransferJob(); + } + + 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 (transferJob_ != null) { + output.writeMessage(1, getTransferJob()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (transferJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTransferJob()); + } + 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.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest other = + (com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest) obj; + + if (hasTransferJob() != other.hasTransferJob()) return false; + if (hasTransferJob()) { + if (!getTransferJob().equals(other.getTransferJob())) 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 (hasTransferJob()) { + hash = (37 * hash) + TRANSFER_JOB_FIELD_NUMBER; + hash = (53 * hash) + getTransferJob().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + 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.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + 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.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + 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.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + 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.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request passed to CreateTransferJob.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.CreateTransferJobRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.CreateTransferJobRequest) + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_CreateTransferJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_CreateTransferJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest.class, + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest.Builder + .class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest.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 (transferJobBuilder_ == null) { + transferJob_ = null; + } else { + transferJob_ = null; + transferJobBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_CreateTransferJobRequest_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest build() { + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + buildPartial() { + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest result = + new com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest(this); + if (transferJobBuilder_ == null) { + result.transferJob_ = transferJob_; + } else { + result.transferJob_ = transferJobBuilder_.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.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest other) { + if (other + == com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + .getDefaultInstance()) return this; + if (other.hasTransferJob()) { + mergeTransferJob(other.getTransferJob()); + } + 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.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.storagetransfer.v1.proto.TransferTypes.TransferJob transferJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder> + transferJobBuilder_; + /** + * + * + *
+       * Required. The job to create.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the transferJob field is set. + */ + public boolean hasTransferJob() { + return transferJobBuilder_ != null || transferJob_ != null; + } + /** + * + * + *
+       * Required. The job to create.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The transferJob. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob getTransferJob() { + if (transferJobBuilder_ == null) { + return transferJob_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.getDefaultInstance() + : transferJob_; + } else { + return transferJobBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The job to create.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTransferJob( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob value) { + if (transferJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transferJob_ = value; + onChanged(); + } else { + transferJobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. The job to create.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTransferJob( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder builderForValue) { + if (transferJobBuilder_ == null) { + transferJob_ = builderForValue.build(); + onChanged(); + } else { + transferJobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. The job to create.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTransferJob( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob value) { + if (transferJobBuilder_ == null) { + if (transferJob_ != null) { + transferJob_ = + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.newBuilder( + transferJob_) + .mergeFrom(value) + .buildPartial(); + } else { + transferJob_ = value; + } + onChanged(); + } else { + transferJobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. The job to create.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTransferJob() { + if (transferJobBuilder_ == null) { + transferJob_ = null; + onChanged(); + } else { + transferJob_ = null; + transferJobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. The job to create.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder + getTransferJobBuilder() { + + onChanged(); + return getTransferJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The job to create.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder + getTransferJobOrBuilder() { + if (transferJobBuilder_ != null) { + return transferJobBuilder_.getMessageOrBuilder(); + } else { + return transferJob_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.getDefaultInstance() + : transferJob_; + } + } + /** + * + * + *
+       * Required. The job to create.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder> + getTransferJobFieldBuilder() { + if (transferJobBuilder_ == null) { + transferJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder>( + getTransferJob(), getParentForChildren(), isClean()); + transferJob_ = null; + } + return transferJobBuilder_; + } + + @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.storagetransfer.v1.CreateTransferJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.CreateTransferJobRequest) + private static final com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest(); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTransferJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTransferJobRequest(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.storagetransfer.v1.proto.TransferProto.CreateTransferJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UpdateTransferJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.UpdateTransferJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of job to update.
+     * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobName. + */ + java.lang.String getJobName(); + /** + * + * + *
+     * Required. The name of job to update.
+     * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobName. + */ + com.google.protobuf.ByteString getJobNameBytes(); + + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that owns the
+     * job.
+     * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that owns the
+     * job.
+     * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+     * Required. The job to update. `transferJob` is expected to specify only
+     * four fields:
+     * [description][google.storagetransfer.v1.TransferJob.description],
+     * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+     * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+     * and [status][google.storagetransfer.v1.TransferJob.status].  An
+     * `UpdateTransferJobRequest` that specifies other fields are rejected with
+     * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+     * job status to
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+     * `storagetransfer.jobs.delete` permissions.
+     * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the transferJob field is set. + */ + boolean hasTransferJob(); + /** + * + * + *
+     * Required. The job to update. `transferJob` is expected to specify only
+     * four fields:
+     * [description][google.storagetransfer.v1.TransferJob.description],
+     * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+     * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+     * and [status][google.storagetransfer.v1.TransferJob.status].  An
+     * `UpdateTransferJobRequest` that specifies other fields are rejected with
+     * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+     * job status to
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+     * `storagetransfer.jobs.delete` permissions.
+     * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The transferJob. + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob getTransferJob(); + /** + * + * + *
+     * Required. The job to update. `transferJob` is expected to specify only
+     * four fields:
+     * [description][google.storagetransfer.v1.TransferJob.description],
+     * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+     * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+     * and [status][google.storagetransfer.v1.TransferJob.status].  An
+     * `UpdateTransferJobRequest` that specifies other fields are rejected with
+     * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+     * job status to
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+     * `storagetransfer.jobs.delete` permissions.
+     * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder + getTransferJobOrBuilder(); + + /** + * + * + *
+     * The field mask of the fields in `transferJob` that are to be updated in
+     * this request.  Fields in `transferJob` that can be updated are:
+     * [description][google.storagetransfer.v1.TransferJob.description],
+     * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+     * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+     * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+     * `transfer_spec` of the job, a complete transfer specification must be
+     * provided. An incomplete specification missing any required fields is
+     * rejected with the error
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + * + * @return Whether the updateTransferJobFieldMask field is set. + */ + boolean hasUpdateTransferJobFieldMask(); + /** + * + * + *
+     * The field mask of the fields in `transferJob` that are to be updated in
+     * this request.  Fields in `transferJob` that can be updated are:
+     * [description][google.storagetransfer.v1.TransferJob.description],
+     * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+     * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+     * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+     * `transfer_spec` of the job, a complete transfer specification must be
+     * provided. An incomplete specification missing any required fields is
+     * rejected with the error
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + * + * @return The updateTransferJobFieldMask. + */ + com.google.protobuf.FieldMask getUpdateTransferJobFieldMask(); + /** + * + * + *
+     * The field mask of the fields in `transferJob` that are to be updated in
+     * this request.  Fields in `transferJob` that can be updated are:
+     * [description][google.storagetransfer.v1.TransferJob.description],
+     * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+     * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+     * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+     * `transfer_spec` of the job, a complete transfer specification must be
+     * provided. An incomplete specification missing any required fields is
+     * rejected with the error
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateTransferJobFieldMaskOrBuilder(); + } + /** + * + * + *
+   * Request passed to UpdateTransferJob.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.UpdateTransferJobRequest} + */ + public static final class UpdateTransferJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.UpdateTransferJobRequest) + UpdateTransferJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTransferJobRequest.newBuilder() to construct. + private UpdateTransferJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTransferJobRequest() { + jobName_ = ""; + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateTransferJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateTransferJobRequest( + 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(); + + jobName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 26: + { + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder subBuilder = + null; + if (transferJob_ != null) { + subBuilder = transferJob_.toBuilder(); + } + transferJob_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transferJob_); + transferJob_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateTransferJobFieldMask_ != null) { + subBuilder = updateTransferJobFieldMask_.toBuilder(); + } + updateTransferJobFieldMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTransferJobFieldMask_); + updateTransferJobFieldMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_UpdateTransferJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_UpdateTransferJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest.class, + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest.Builder + .class); + } + + public static final int JOB_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object jobName_; + /** + * + * + *
+     * Required. The name of job to update.
+     * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobName. + */ + @java.lang.Override + public java.lang.String getJobName() { + java.lang.Object ref = jobName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobName_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The name of job to update.
+     * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobNameBytes() { + java.lang.Object ref = jobName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object projectId_; + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that owns the
+     * job.
+     * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that owns the
+     * job.
+     * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSFER_JOB_FIELD_NUMBER = 3; + private com.google.storagetransfer.v1.proto.TransferTypes.TransferJob transferJob_; + /** + * + * + *
+     * Required. The job to update. `transferJob` is expected to specify only
+     * four fields:
+     * [description][google.storagetransfer.v1.TransferJob.description],
+     * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+     * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+     * and [status][google.storagetransfer.v1.TransferJob.status].  An
+     * `UpdateTransferJobRequest` that specifies other fields are rejected with
+     * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+     * job status to
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+     * `storagetransfer.jobs.delete` permissions.
+     * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the transferJob field is set. + */ + @java.lang.Override + public boolean hasTransferJob() { + return transferJob_ != null; + } + /** + * + * + *
+     * Required. The job to update. `transferJob` is expected to specify only
+     * four fields:
+     * [description][google.storagetransfer.v1.TransferJob.description],
+     * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+     * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+     * and [status][google.storagetransfer.v1.TransferJob.status].  An
+     * `UpdateTransferJobRequest` that specifies other fields are rejected with
+     * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+     * job status to
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+     * `storagetransfer.jobs.delete` permissions.
+     * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The transferJob. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob getTransferJob() { + return transferJob_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.getDefaultInstance() + : transferJob_; + } + /** + * + * + *
+     * Required. The job to update. `transferJob` is expected to specify only
+     * four fields:
+     * [description][google.storagetransfer.v1.TransferJob.description],
+     * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+     * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+     * and [status][google.storagetransfer.v1.TransferJob.status].  An
+     * `UpdateTransferJobRequest` that specifies other fields are rejected with
+     * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+     * job status to
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+     * `storagetransfer.jobs.delete` permissions.
+     * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder + getTransferJobOrBuilder() { + return getTransferJob(); + } + + public static final int UPDATE_TRANSFER_JOB_FIELD_MASK_FIELD_NUMBER = 4; + private com.google.protobuf.FieldMask updateTransferJobFieldMask_; + /** + * + * + *
+     * The field mask of the fields in `transferJob` that are to be updated in
+     * this request.  Fields in `transferJob` that can be updated are:
+     * [description][google.storagetransfer.v1.TransferJob.description],
+     * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+     * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+     * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+     * `transfer_spec` of the job, a complete transfer specification must be
+     * provided. An incomplete specification missing any required fields is
+     * rejected with the error
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + * + * @return Whether the updateTransferJobFieldMask field is set. + */ + @java.lang.Override + public boolean hasUpdateTransferJobFieldMask() { + return updateTransferJobFieldMask_ != null; + } + /** + * + * + *
+     * The field mask of the fields in `transferJob` that are to be updated in
+     * this request.  Fields in `transferJob` that can be updated are:
+     * [description][google.storagetransfer.v1.TransferJob.description],
+     * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+     * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+     * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+     * `transfer_spec` of the job, a complete transfer specification must be
+     * provided. An incomplete specification missing any required fields is
+     * rejected with the error
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + * + * @return The updateTransferJobFieldMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateTransferJobFieldMask() { + return updateTransferJobFieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateTransferJobFieldMask_; + } + /** + * + * + *
+     * The field mask of the fields in `transferJob` that are to be updated in
+     * this request.  Fields in `transferJob` that can be updated are:
+     * [description][google.storagetransfer.v1.TransferJob.description],
+     * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+     * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+     * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+     * `transfer_spec` of the job, a complete transfer specification must be
+     * provided. An incomplete specification missing any required fields is
+     * rejected with the error
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+     * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateTransferJobFieldMaskOrBuilder() { + return getUpdateTransferJobFieldMask(); + } + + 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 (!getJobNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, jobName_); + } + if (!getProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (transferJob_ != null) { + output.writeMessage(3, getTransferJob()); + } + if (updateTransferJobFieldMask_ != null) { + output.writeMessage(4, getUpdateTransferJobFieldMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getJobNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, jobName_); + } + if (!getProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (transferJob_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTransferJob()); + } + if (updateTransferJobFieldMask_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, getUpdateTransferJobFieldMask()); + } + 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.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest other = + (com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest) obj; + + if (!getJobName().equals(other.getJobName())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (hasTransferJob() != other.hasTransferJob()) return false; + if (hasTransferJob()) { + if (!getTransferJob().equals(other.getTransferJob())) return false; + } + if (hasUpdateTransferJobFieldMask() != other.hasUpdateTransferJobFieldMask()) return false; + if (hasUpdateTransferJobFieldMask()) { + if (!getUpdateTransferJobFieldMask().equals(other.getUpdateTransferJobFieldMask())) + 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) + JOB_NAME_FIELD_NUMBER; + hash = (53 * hash) + getJobName().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + if (hasTransferJob()) { + hash = (37 * hash) + TRANSFER_JOB_FIELD_NUMBER; + hash = (53 * hash) + getTransferJob().hashCode(); + } + if (hasUpdateTransferJobFieldMask()) { + hash = (37 * hash) + UPDATE_TRANSFER_JOB_FIELD_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTransferJobFieldMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + 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.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + 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.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + 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.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + 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.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request passed to UpdateTransferJob.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.UpdateTransferJobRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.UpdateTransferJobRequest) + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_UpdateTransferJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_UpdateTransferJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest.class, + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest.Builder + .class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest.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(); + jobName_ = ""; + + projectId_ = ""; + + if (transferJobBuilder_ == null) { + transferJob_ = null; + } else { + transferJob_ = null; + transferJobBuilder_ = null; + } + if (updateTransferJobFieldMaskBuilder_ == null) { + updateTransferJobFieldMask_ = null; + } else { + updateTransferJobFieldMask_ = null; + updateTransferJobFieldMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_UpdateTransferJobRequest_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest build() { + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + buildPartial() { + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest result = + new com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest(this); + result.jobName_ = jobName_; + result.projectId_ = projectId_; + if (transferJobBuilder_ == null) { + result.transferJob_ = transferJob_; + } else { + result.transferJob_ = transferJobBuilder_.build(); + } + if (updateTransferJobFieldMaskBuilder_ == null) { + result.updateTransferJobFieldMask_ = updateTransferJobFieldMask_; + } else { + result.updateTransferJobFieldMask_ = updateTransferJobFieldMaskBuilder_.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.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest other) { + if (other + == com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + .getDefaultInstance()) return this; + if (!other.getJobName().isEmpty()) { + jobName_ = other.jobName_; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + if (other.hasTransferJob()) { + mergeTransferJob(other.getTransferJob()); + } + if (other.hasUpdateTransferJobFieldMask()) { + mergeUpdateTransferJobFieldMask(other.getUpdateTransferJobFieldMask()); + } + 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.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object jobName_ = ""; + /** + * + * + *
+       * Required. The name of job to update.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobName. + */ + public java.lang.String getJobName() { + java.lang.Object ref = jobName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The name of job to update.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobName. + */ + public com.google.protobuf.ByteString getJobNameBytes() { + java.lang.Object ref = jobName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The name of job to update.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The jobName to set. + * @return This builder for chaining. + */ + public Builder setJobName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of job to update.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearJobName() { + + jobName_ = getDefaultInstance().getJobName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of job to update.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for jobName to set. + * @return This builder for chaining. + */ + public Builder setJobNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobName_ = value; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + onChanged(); + return this; + } + + private com.google.storagetransfer.v1.proto.TransferTypes.TransferJob transferJob_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder> + transferJobBuilder_; + /** + * + * + *
+       * Required. The job to update. `transferJob` is expected to specify only
+       * four fields:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  An
+       * `UpdateTransferJobRequest` that specifies other fields are rejected with
+       * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+       * job status to
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+       * `storagetransfer.jobs.delete` permissions.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the transferJob field is set. + */ + public boolean hasTransferJob() { + return transferJobBuilder_ != null || transferJob_ != null; + } + /** + * + * + *
+       * Required. The job to update. `transferJob` is expected to specify only
+       * four fields:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  An
+       * `UpdateTransferJobRequest` that specifies other fields are rejected with
+       * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+       * job status to
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+       * `storagetransfer.jobs.delete` permissions.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The transferJob. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob getTransferJob() { + if (transferJobBuilder_ == null) { + return transferJob_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.getDefaultInstance() + : transferJob_; + } else { + return transferJobBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The job to update. `transferJob` is expected to specify only
+       * four fields:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  An
+       * `UpdateTransferJobRequest` that specifies other fields are rejected with
+       * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+       * job status to
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+       * `storagetransfer.jobs.delete` permissions.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTransferJob( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob value) { + if (transferJobBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transferJob_ = value; + onChanged(); + } else { + transferJobBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. The job to update. `transferJob` is expected to specify only
+       * four fields:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  An
+       * `UpdateTransferJobRequest` that specifies other fields are rejected with
+       * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+       * job status to
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+       * `storagetransfer.jobs.delete` permissions.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setTransferJob( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder builderForValue) { + if (transferJobBuilder_ == null) { + transferJob_ = builderForValue.build(); + onChanged(); + } else { + transferJobBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. The job to update. `transferJob` is expected to specify only
+       * four fields:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  An
+       * `UpdateTransferJobRequest` that specifies other fields are rejected with
+       * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+       * job status to
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+       * `storagetransfer.jobs.delete` permissions.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeTransferJob( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob value) { + if (transferJobBuilder_ == null) { + if (transferJob_ != null) { + transferJob_ = + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.newBuilder( + transferJob_) + .mergeFrom(value) + .buildPartial(); + } else { + transferJob_ = value; + } + onChanged(); + } else { + transferJobBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. The job to update. `transferJob` is expected to specify only
+       * four fields:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  An
+       * `UpdateTransferJobRequest` that specifies other fields are rejected with
+       * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+       * job status to
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+       * `storagetransfer.jobs.delete` permissions.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearTransferJob() { + if (transferJobBuilder_ == null) { + transferJob_ = null; + onChanged(); + } else { + transferJob_ = null; + transferJobBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. The job to update. `transferJob` is expected to specify only
+       * four fields:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  An
+       * `UpdateTransferJobRequest` that specifies other fields are rejected with
+       * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+       * job status to
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+       * `storagetransfer.jobs.delete` permissions.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder + getTransferJobBuilder() { + + onChanged(); + return getTransferJobFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The job to update. `transferJob` is expected to specify only
+       * four fields:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  An
+       * `UpdateTransferJobRequest` that specifies other fields are rejected with
+       * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+       * job status to
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+       * `storagetransfer.jobs.delete` permissions.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder + getTransferJobOrBuilder() { + if (transferJobBuilder_ != null) { + return transferJobBuilder_.getMessageOrBuilder(); + } else { + return transferJob_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.getDefaultInstance() + : transferJob_; + } + } + /** + * + * + *
+       * Required. The job to update. `transferJob` is expected to specify only
+       * four fields:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  An
+       * `UpdateTransferJobRequest` that specifies other fields are rejected with
+       * the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a
+       * job status to
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires
+       * `storagetransfer.jobs.delete` permissions.
+       * 
+ * + * + * .google.storagetransfer.v1.TransferJob transfer_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder> + getTransferJobFieldBuilder() { + if (transferJobBuilder_ == null) { + transferJobBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder>( + getTransferJob(), getParentForChildren(), isClean()); + transferJob_ = null; + } + return transferJobBuilder_; + } + + private com.google.protobuf.FieldMask updateTransferJobFieldMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateTransferJobFieldMaskBuilder_; + /** + * + * + *
+       * The field mask of the fields in `transferJob` that are to be updated in
+       * this request.  Fields in `transferJob` that can be updated are:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+       * `transfer_spec` of the job, a complete transfer specification must be
+       * provided. An incomplete specification missing any required fields is
+       * rejected with the error
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+       * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + * + * @return Whether the updateTransferJobFieldMask field is set. + */ + public boolean hasUpdateTransferJobFieldMask() { + return updateTransferJobFieldMaskBuilder_ != null || updateTransferJobFieldMask_ != null; + } + /** + * + * + *
+       * The field mask of the fields in `transferJob` that are to be updated in
+       * this request.  Fields in `transferJob` that can be updated are:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+       * `transfer_spec` of the job, a complete transfer specification must be
+       * provided. An incomplete specification missing any required fields is
+       * rejected with the error
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+       * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + * + * @return The updateTransferJobFieldMask. + */ + public com.google.protobuf.FieldMask getUpdateTransferJobFieldMask() { + if (updateTransferJobFieldMaskBuilder_ == null) { + return updateTransferJobFieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateTransferJobFieldMask_; + } else { + return updateTransferJobFieldMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The field mask of the fields in `transferJob` that are to be updated in
+       * this request.  Fields in `transferJob` that can be updated are:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+       * `transfer_spec` of the job, a complete transfer specification must be
+       * provided. An incomplete specification missing any required fields is
+       * rejected with the error
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+       * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + */ + public Builder setUpdateTransferJobFieldMask(com.google.protobuf.FieldMask value) { + if (updateTransferJobFieldMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTransferJobFieldMask_ = value; + onChanged(); + } else { + updateTransferJobFieldMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The field mask of the fields in `transferJob` that are to be updated in
+       * this request.  Fields in `transferJob` that can be updated are:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+       * `transfer_spec` of the job, a complete transfer specification must be
+       * provided. An incomplete specification missing any required fields is
+       * rejected with the error
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+       * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + */ + public Builder setUpdateTransferJobFieldMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateTransferJobFieldMaskBuilder_ == null) { + updateTransferJobFieldMask_ = builderForValue.build(); + onChanged(); + } else { + updateTransferJobFieldMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The field mask of the fields in `transferJob` that are to be updated in
+       * this request.  Fields in `transferJob` that can be updated are:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+       * `transfer_spec` of the job, a complete transfer specification must be
+       * provided. An incomplete specification missing any required fields is
+       * rejected with the error
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+       * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + */ + public Builder mergeUpdateTransferJobFieldMask(com.google.protobuf.FieldMask value) { + if (updateTransferJobFieldMaskBuilder_ == null) { + if (updateTransferJobFieldMask_ != null) { + updateTransferJobFieldMask_ = + com.google.protobuf.FieldMask.newBuilder(updateTransferJobFieldMask_) + .mergeFrom(value) + .buildPartial(); + } else { + updateTransferJobFieldMask_ = value; + } + onChanged(); + } else { + updateTransferJobFieldMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The field mask of the fields in `transferJob` that are to be updated in
+       * this request.  Fields in `transferJob` that can be updated are:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+       * `transfer_spec` of the job, a complete transfer specification must be
+       * provided. An incomplete specification missing any required fields is
+       * rejected with the error
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+       * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + */ + public Builder clearUpdateTransferJobFieldMask() { + if (updateTransferJobFieldMaskBuilder_ == null) { + updateTransferJobFieldMask_ = null; + onChanged(); + } else { + updateTransferJobFieldMask_ = null; + updateTransferJobFieldMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The field mask of the fields in `transferJob` that are to be updated in
+       * this request.  Fields in `transferJob` that can be updated are:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+       * `transfer_spec` of the job, a complete transfer specification must be
+       * provided. An incomplete specification missing any required fields is
+       * rejected with the error
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+       * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + */ + public com.google.protobuf.FieldMask.Builder getUpdateTransferJobFieldMaskBuilder() { + + onChanged(); + return getUpdateTransferJobFieldMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The field mask of the fields in `transferJob` that are to be updated in
+       * this request.  Fields in `transferJob` that can be updated are:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+       * `transfer_spec` of the job, a complete transfer specification must be
+       * provided. An incomplete specification missing any required fields is
+       * rejected with the error
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+       * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateTransferJobFieldMaskOrBuilder() { + if (updateTransferJobFieldMaskBuilder_ != null) { + return updateTransferJobFieldMaskBuilder_.getMessageOrBuilder(); + } else { + return updateTransferJobFieldMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateTransferJobFieldMask_; + } + } + /** + * + * + *
+       * The field mask of the fields in `transferJob` that are to be updated in
+       * this request.  Fields in `transferJob` that can be updated are:
+       * [description][google.storagetransfer.v1.TransferJob.description],
+       * [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec],
+       * [notification_config][google.storagetransfer.v1.TransferJob.notification_config],
+       * and [status][google.storagetransfer.v1.TransferJob.status].  To update the
+       * `transfer_spec` of the job, a complete transfer specification must be
+       * provided. An incomplete specification missing any required fields is
+       * rejected with the error
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
+       * 
+ * + * .google.protobuf.FieldMask update_transfer_job_field_mask = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateTransferJobFieldMaskFieldBuilder() { + if (updateTransferJobFieldMaskBuilder_ == null) { + updateTransferJobFieldMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateTransferJobFieldMask(), getParentForChildren(), isClean()); + updateTransferJobFieldMask_ = null; + } + return updateTransferJobFieldMaskBuilder_; + } + + @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.storagetransfer.v1.UpdateTransferJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.UpdateTransferJobRequest) + private static final com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest(); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTransferJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateTransferJobRequest(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.storagetransfer.v1.proto.TransferProto.UpdateTransferJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GetTransferJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.GetTransferJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required.
+     * The job to get.
+     * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobName. + */ + java.lang.String getJobName(); + /** + * + * + *
+     * Required.
+     * The job to get.
+     * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobName. + */ + com.google.protobuf.ByteString getJobNameBytes(); + + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that owns the
+     * job.
+     * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that owns the
+     * job.
+     * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + } + /** + * + * + *
+   * Request passed to GetTransferJob.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.GetTransferJobRequest} + */ + public static final class GetTransferJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.GetTransferJobRequest) + GetTransferJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTransferJobRequest.newBuilder() to construct. + private GetTransferJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTransferJobRequest() { + jobName_ = ""; + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetTransferJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetTransferJobRequest( + 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(); + + jobName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = 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.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_GetTransferJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_GetTransferJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest.class, + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest.Builder + .class); + } + + public static final int JOB_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object jobName_; + /** + * + * + *
+     * Required.
+     * The job to get.
+     * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobName. + */ + @java.lang.Override + public java.lang.String getJobName() { + java.lang.Object ref = jobName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobName_ = s; + return s; + } + } + /** + * + * + *
+     * Required.
+     * The job to get.
+     * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobNameBytes() { + java.lang.Object ref = jobName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object projectId_; + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that owns the
+     * job.
+     * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that owns the
+     * job.
+     * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = 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 (!getJobNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, jobName_); + } + if (!getProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getJobNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, jobName_); + } + if (!getProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + 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.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest other = + (com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest) obj; + + if (!getJobName().equals(other.getJobName())) return false; + if (!getProjectId().equals(other.getProjectId())) 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) + JOB_NAME_FIELD_NUMBER; + hash = (53 * hash) + getJobName().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest 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.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest 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.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest + 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.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest 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.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request passed to GetTransferJob.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.GetTransferJobRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.GetTransferJobRequest) + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_GetTransferJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_GetTransferJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest.class, + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest.Builder + .class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest.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(); + jobName_ = ""; + + projectId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_GetTransferJobRequest_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest build() { + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest + buildPartial() { + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest result = + new com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest(this); + result.jobName_ = jobName_; + result.projectId_ = projectId_; + 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.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest other) { + if (other + == com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest + .getDefaultInstance()) return this; + if (!other.getJobName().isEmpty()) { + jobName_ = other.jobName_; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + 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.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object jobName_ = ""; + /** + * + * + *
+       * Required.
+       * The job to get.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobName. + */ + public java.lang.String getJobName() { + java.lang.Object ref = jobName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required.
+       * The job to get.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobName. + */ + public com.google.protobuf.ByteString getJobNameBytes() { + java.lang.Object ref = jobName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required.
+       * The job to get.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The jobName to set. + * @return This builder for chaining. + */ + public Builder setJobName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required.
+       * The job to get.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearJobName() { + + jobName_ = getDefaultInstance().getJobName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required.
+       * The job to get.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for jobName to set. + * @return This builder for chaining. + */ + public Builder setJobNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobName_ = value; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = 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.storagetransfer.v1.GetTransferJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.GetTransferJobRequest) + private static final com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest(); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTransferJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetTransferJobRequest(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.storagetransfer.v1.proto.TransferProto.GetTransferJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListTransferJobsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.ListTransferJobsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. A list of query parameters specified as JSON text in the form of:
+     * `{"projectId":"my_project_id",
+     *  "jobNames":["jobid1","jobid2",...],
+     *  "jobStatuses":["status1","status2",...]}`
+     * Since `jobNames` and `jobStatuses` support multiple values, their values
+     * must be specified with array notation. `projectId` is required.
+     * `jobNames` and `jobStatuses` are optional.  The valid values for
+     * `jobStatuses` are case-insensitive:
+     * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED],
+     * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED].
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+     * Required. A list of query parameters specified as JSON text in the form of:
+     * `{"projectId":"my_project_id",
+     *  "jobNames":["jobid1","jobid2",...],
+     *  "jobStatuses":["status1","status2",...]}`
+     * Since `jobNames` and `jobStatuses` support multiple values, their values
+     * must be specified with array notation. `projectId` is required.
+     * `jobNames` and `jobStatuses` are optional.  The valid values for
+     * `jobStatuses` are case-insensitive:
+     * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED],
+     * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED].
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+     * The list page size. The max allowed value is 256.
+     * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+     * The list page token.
+     * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+     * The list page token.
+     * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + } + /** + * + * + *
+   * `projectId`, `jobNames`, and `jobStatuses` are query parameters that can
+   * be specified when listing transfer jobs.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.ListTransferJobsRequest} + */ + public static final class ListTransferJobsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.ListTransferJobsRequest) + ListTransferJobsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTransferJobsRequest.newBuilder() to construct. + private ListTransferJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTransferJobsRequest() { + filter_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTransferJobsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTransferJobsRequest( + 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(); + + filter_ = s; + break; + } + case 32: + { + pageSize_ = input.readInt32(); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ListTransferJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ListTransferJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest.class, + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest.Builder + .class); + } + + public static final int FILTER_FIELD_NUMBER = 1; + private volatile java.lang.Object filter_; + /** + * + * + *
+     * Required. A list of query parameters specified as JSON text in the form of:
+     * `{"projectId":"my_project_id",
+     *  "jobNames":["jobid1","jobid2",...],
+     *  "jobStatuses":["status1","status2",...]}`
+     * Since `jobNames` and `jobStatuses` support multiple values, their values
+     * must be specified with array notation. `projectId` is required.
+     * `jobNames` and `jobStatuses` are optional.  The valid values for
+     * `jobStatuses` are case-insensitive:
+     * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED],
+     * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED].
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+     * Required. A list of query parameters specified as JSON text in the form of:
+     * `{"projectId":"my_project_id",
+     *  "jobNames":["jobid1","jobid2",...],
+     *  "jobStatuses":["status1","status2",...]}`
+     * Since `jobNames` and `jobStatuses` support multiple values, their values
+     * must be specified with array notation. `projectId` is required.
+     * `jobNames` and `jobStatuses` are optional.  The valid values for
+     * `jobStatuses` are case-insensitive:
+     * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED],
+     * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and
+     * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED].
+     * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + * + * + *
+     * The list page size. The max allowed value is 256.
+     * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+     * The list page token.
+     * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+     * The list page token.
+     * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest other = + (com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest) obj; + + if (!getFilter().equals(other.getFilter())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + 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.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + 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.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + 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.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + 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.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest 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; + } + /** + * + * + *
+     * `projectId`, `jobNames`, and `jobStatuses` are query parameters that can
+     * be specified when listing transfer jobs.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.ListTransferJobsRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.ListTransferJobsRequest) + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ListTransferJobsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ListTransferJobsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest.class, + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest.Builder + .class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest.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(); + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ListTransferJobsRequest_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest build() { + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + buildPartial() { + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest result = + new com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest(this); + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest other) { + if (other + == com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + .getDefaultInstance()) return this; + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+       * Required. A list of query parameters specified as JSON text in the form of:
+       * `{"projectId":"my_project_id",
+       *  "jobNames":["jobid1","jobid2",...],
+       *  "jobStatuses":["status1","status2",...]}`
+       * Since `jobNames` and `jobStatuses` support multiple values, their values
+       * must be specified with array notation. `projectId` is required.
+       * `jobNames` and `jobStatuses` are optional.  The valid values for
+       * `jobStatuses` are case-insensitive:
+       * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED],
+       * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED].
+       * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. A list of query parameters specified as JSON text in the form of:
+       * `{"projectId":"my_project_id",
+       *  "jobNames":["jobid1","jobid2",...],
+       *  "jobStatuses":["status1","status2",...]}`
+       * Since `jobNames` and `jobStatuses` support multiple values, their values
+       * must be specified with array notation. `projectId` is required.
+       * `jobNames` and `jobStatuses` are optional.  The valid values for
+       * `jobStatuses` are case-insensitive:
+       * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED],
+       * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED].
+       * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. A list of query parameters specified as JSON text in the form of:
+       * `{"projectId":"my_project_id",
+       *  "jobNames":["jobid1","jobid2",...],
+       *  "jobStatuses":["status1","status2",...]}`
+       * Since `jobNames` and `jobStatuses` support multiple values, their values
+       * must be specified with array notation. `projectId` is required.
+       * `jobNames` and `jobStatuses` are optional.  The valid values for
+       * `jobStatuses` are case-insensitive:
+       * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED],
+       * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED].
+       * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. A list of query parameters specified as JSON text in the form of:
+       * `{"projectId":"my_project_id",
+       *  "jobNames":["jobid1","jobid2",...],
+       *  "jobStatuses":["status1","status2",...]}`
+       * Since `jobNames` and `jobStatuses` support multiple values, their values
+       * must be specified with array notation. `projectId` is required.
+       * `jobNames` and `jobStatuses` are optional.  The valid values for
+       * `jobStatuses` are case-insensitive:
+       * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED],
+       * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED].
+       * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. A list of query parameters specified as JSON text in the form of:
+       * `{"projectId":"my_project_id",
+       *  "jobNames":["jobid1","jobid2",...],
+       *  "jobStatuses":["status1","status2",...]}`
+       * Since `jobNames` and `jobStatuses` support multiple values, their values
+       * must be specified with array notation. `projectId` is required.
+       * `jobNames` and `jobStatuses` are optional.  The valid values for
+       * `jobStatuses` are case-insensitive:
+       * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED],
+       * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and
+       * [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED].
+       * 
+ * + * string filter = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+       * The list page size. The max allowed value is 256.
+       * 
+ * + * int32 page_size = 4; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+       * The list page size. The max allowed value is 256.
+       * 
+ * + * int32 page_size = 4; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The list page size. The max allowed value is 256.
+       * 
+ * + * int32 page_size = 4; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+       * The list page token.
+       * 
+ * + * string page_token = 5; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The list page token.
+       * 
+ * + * string page_token = 5; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The list page token.
+       * 
+ * + * string page_token = 5; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The list page token.
+       * 
+ * + * string page_token = 5; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+       * The list page token.
+       * 
+ * + * string page_token = 5; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.storagetransfer.v1.ListTransferJobsRequest) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.ListTransferJobsRequest) + private static final com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest(); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTransferJobsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTransferJobsRequest(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.storagetransfer.v1.proto.TransferProto.ListTransferJobsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListTransferJobsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.ListTransferJobsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A list of transfer jobs.
+     * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + java.util.List + getTransferJobsList(); + /** + * + * + *
+     * A list of transfer jobs.
+     * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob getTransferJobs(int index); + /** + * + * + *
+     * A list of transfer jobs.
+     * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + int getTransferJobsCount(); + /** + * + * + *
+     * A list of transfer jobs.
+     * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + java.util.List + getTransferJobsOrBuilderList(); + /** + * + * + *
+     * A list of transfer jobs.
+     * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder getTransferJobsOrBuilder( + int index); + + /** + * + * + *
+     * The list next page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+     * The list next page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + } + /** + * + * + *
+   * Response from ListTransferJobs.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.ListTransferJobsResponse} + */ + public static final class ListTransferJobsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.ListTransferJobsResponse) + ListTransferJobsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTransferJobsResponse.newBuilder() to construct. + private ListTransferJobsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTransferJobsResponse() { + transferJobs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTransferJobsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTransferJobsResponse( + 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)) { + transferJobs_ = + new java.util.ArrayList< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob>(); + mutable_bitField0_ |= 0x00000001; + } + transferJobs_.add( + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + transferJobs_ = java.util.Collections.unmodifiableList(transferJobs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ListTransferJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ListTransferJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse.class, + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse.Builder + .class); + } + + public static final int TRANSFER_JOBS_FIELD_NUMBER = 1; + private java.util.List + transferJobs_; + /** + * + * + *
+     * A list of transfer jobs.
+     * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + @java.lang.Override + public java.util.List + getTransferJobsList() { + return transferJobs_; + } + /** + * + * + *
+     * A list of transfer jobs.
+     * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder> + getTransferJobsOrBuilderList() { + return transferJobs_; + } + /** + * + * + *
+     * A list of transfer jobs.
+     * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + @java.lang.Override + public int getTransferJobsCount() { + return transferJobs_.size(); + } + /** + * + * + *
+     * A list of transfer jobs.
+     * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob getTransferJobs( + int index) { + return transferJobs_.get(index); + } + /** + * + * + *
+     * A list of transfer jobs.
+     * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder + getTransferJobsOrBuilder(int index) { + return transferJobs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+     * The list next page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+     * The list next page token.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + 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 < transferJobs_.size(); i++) { + output.writeMessage(1, transferJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < transferJobs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, transferJobs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse other = + (com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse) obj; + + if (!getTransferJobsList().equals(other.getTransferJobsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTransferJobsCount() > 0) { + hash = (37 * hash) + TRANSFER_JOBS_FIELD_NUMBER; + hash = (53 * hash) + getTransferJobsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + 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.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + 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.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + 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.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + 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.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Response from ListTransferJobs.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.ListTransferJobsResponse} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.ListTransferJobsResponse) + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ListTransferJobsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ListTransferJobsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse.class, + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse.Builder + .class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTransferJobsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (transferJobsBuilder_ == null) { + transferJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transferJobsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ListTransferJobsResponse_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse build() { + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + buildPartial() { + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse result = + new com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse(this); + int from_bitField0_ = bitField0_; + if (transferJobsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transferJobs_ = java.util.Collections.unmodifiableList(transferJobs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transferJobs_ = transferJobs_; + } else { + result.transferJobs_ = transferJobsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse other) { + if (other + == com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + .getDefaultInstance()) return this; + if (transferJobsBuilder_ == null) { + if (!other.transferJobs_.isEmpty()) { + if (transferJobs_.isEmpty()) { + transferJobs_ = other.transferJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransferJobsIsMutable(); + transferJobs_.addAll(other.transferJobs_); + } + onChanged(); + } + } else { + if (!other.transferJobs_.isEmpty()) { + if (transferJobsBuilder_.isEmpty()) { + transferJobsBuilder_.dispose(); + transferJobsBuilder_ = null; + transferJobs_ = other.transferJobs_; + bitField0_ = (bitField0_ & ~0x00000001); + transferJobsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTransferJobsFieldBuilder() + : null; + } else { + transferJobsBuilder_.addAllMessages(other.transferJobs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + transferJobs_ = java.util.Collections.emptyList(); + + private void ensureTransferJobsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transferJobs_ = + new java.util.ArrayList< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob>(transferJobs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder> + transferJobsBuilder_; + + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public java.util.List + getTransferJobsList() { + if (transferJobsBuilder_ == null) { + return java.util.Collections.unmodifiableList(transferJobs_); + } else { + return transferJobsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public int getTransferJobsCount() { + if (transferJobsBuilder_ == null) { + return transferJobs_.size(); + } else { + return transferJobsBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob getTransferJobs( + int index) { + if (transferJobsBuilder_ == null) { + return transferJobs_.get(index); + } else { + return transferJobsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public Builder setTransferJobs( + int index, com.google.storagetransfer.v1.proto.TransferTypes.TransferJob value) { + if (transferJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransferJobsIsMutable(); + transferJobs_.set(index, value); + onChanged(); + } else { + transferJobsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public Builder setTransferJobs( + int index, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder builderForValue) { + if (transferJobsBuilder_ == null) { + ensureTransferJobsIsMutable(); + transferJobs_.set(index, builderForValue.build()); + onChanged(); + } else { + transferJobsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public Builder addTransferJobs( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob value) { + if (transferJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransferJobsIsMutable(); + transferJobs_.add(value); + onChanged(); + } else { + transferJobsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public Builder addTransferJobs( + int index, com.google.storagetransfer.v1.proto.TransferTypes.TransferJob value) { + if (transferJobsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransferJobsIsMutable(); + transferJobs_.add(index, value); + onChanged(); + } else { + transferJobsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public Builder addTransferJobs( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder builderForValue) { + if (transferJobsBuilder_ == null) { + ensureTransferJobsIsMutable(); + transferJobs_.add(builderForValue.build()); + onChanged(); + } else { + transferJobsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public Builder addTransferJobs( + int index, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder builderForValue) { + if (transferJobsBuilder_ == null) { + ensureTransferJobsIsMutable(); + transferJobs_.add(index, builderForValue.build()); + onChanged(); + } else { + transferJobsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public Builder addAllTransferJobs( + java.lang.Iterable< + ? extends com.google.storagetransfer.v1.proto.TransferTypes.TransferJob> + values) { + if (transferJobsBuilder_ == null) { + ensureTransferJobsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transferJobs_); + onChanged(); + } else { + transferJobsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public Builder clearTransferJobs() { + if (transferJobsBuilder_ == null) { + transferJobs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transferJobsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public Builder removeTransferJobs(int index) { + if (transferJobsBuilder_ == null) { + ensureTransferJobsIsMutable(); + transferJobs_.remove(index); + onChanged(); + } else { + transferJobsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder + getTransferJobsBuilder(int index) { + return getTransferJobsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder + getTransferJobsOrBuilder(int index) { + if (transferJobsBuilder_ == null) { + return transferJobs_.get(index); + } else { + return transferJobsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public java.util.List< + ? extends com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder> + getTransferJobsOrBuilderList() { + if (transferJobsBuilder_ != null) { + return transferJobsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transferJobs_); + } + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder + addTransferJobsBuilder() { + return getTransferJobsFieldBuilder() + .addBuilder( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.getDefaultInstance()); + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder + addTransferJobsBuilder(int index) { + return getTransferJobsFieldBuilder() + .addBuilder( + index, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.getDefaultInstance()); + } + /** + * + * + *
+       * A list of transfer jobs.
+       * 
+ * + * repeated .google.storagetransfer.v1.TransferJob transfer_jobs = 1; + */ + public java.util.List + getTransferJobsBuilderList() { + return getTransferJobsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder> + getTransferJobsFieldBuilder() { + if (transferJobsBuilder_ == null) { + transferJobsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder>( + transferJobs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + transferJobs_ = null; + } + return transferJobsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+       * The list next page token.
+       * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The list next page token.
+       * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The list next page token.
+       * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The list next page token.
+       * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+       * The list next page token.
+       * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @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.storagetransfer.v1.ListTransferJobsResponse) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.ListTransferJobsResponse) + private static final com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse(); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTransferJobsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTransferJobsResponse(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.storagetransfer.v1.proto.TransferProto.ListTransferJobsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PauseTransferOperationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.PauseTransferOperationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the transfer operation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The name of the transfer operation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * Request passed to PauseTransferOperation.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.PauseTransferOperationRequest} + */ + public static final class PauseTransferOperationRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.PauseTransferOperationRequest) + PauseTransferOperationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PauseTransferOperationRequest.newBuilder() to construct. + private PauseTransferOperationRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PauseTransferOperationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PauseTransferOperationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PauseTransferOperationRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_PauseTransferOperationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_PauseTransferOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest.class, + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The name of the transfer operation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The name of the transfer operation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest other = + (com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + 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.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + 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.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + 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.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + 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.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request passed to PauseTransferOperation.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.PauseTransferOperationRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.PauseTransferOperationRequest) + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_PauseTransferOperationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_PauseTransferOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + .class, + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + .Builder.class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_PauseTransferOperationRequest_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + build() { + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + buildPartial() { + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest result = + new com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest( + this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest other) { + if (other + == com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The name of the transfer operation.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The name of the transfer operation.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The name of the transfer operation.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of the transfer operation.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of the transfer operation.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @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.storagetransfer.v1.PauseTransferOperationRequest) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.PauseTransferOperationRequest) + private static final com.google.storagetransfer.v1.proto.TransferProto + .PauseTransferOperationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest(); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PauseTransferOperationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PauseTransferOperationRequest(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.storagetransfer.v1.proto.TransferProto.PauseTransferOperationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ResumeTransferOperationRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.ResumeTransferOperationRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the transfer operation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The name of the transfer operation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * Request passed to ResumeTransferOperation.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.ResumeTransferOperationRequest} + */ + public static final class ResumeTransferOperationRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.ResumeTransferOperationRequest) + ResumeTransferOperationRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResumeTransferOperationRequest.newBuilder() to construct. + private ResumeTransferOperationRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResumeTransferOperationRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResumeTransferOperationRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResumeTransferOperationRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ResumeTransferOperationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ResumeTransferOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + .class, + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The name of the transfer operation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The name of the transfer operation.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest other = + (com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + 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.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + 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.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + 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.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + 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.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request passed to ResumeTransferOperation.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.ResumeTransferOperationRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.ResumeTransferOperationRequest) + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ResumeTransferOperationRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ResumeTransferOperationRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + .class, + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + .Builder.class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_ResumeTransferOperationRequest_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + build() { + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + buildPartial() { + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest result = + new com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest( + this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest other) { + if (other + == com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The name of the transfer operation.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The name of the transfer operation.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The name of the transfer operation.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of the transfer operation.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of the transfer operation.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @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.storagetransfer.v1.ResumeTransferOperationRequest) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.ResumeTransferOperationRequest) + private static final com.google.storagetransfer.v1.proto.TransferProto + .ResumeTransferOperationRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest(); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResumeTransferOperationRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResumeTransferOperationRequest(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.storagetransfer.v1.proto.TransferProto.ResumeTransferOperationRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface RunTransferJobRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.RunTransferJobRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the transfer job.
+     * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobName. + */ + java.lang.String getJobName(); + /** + * + * + *
+     * Required. The name of the transfer job.
+     * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobName. + */ + com.google.protobuf.ByteString getJobNameBytes(); + + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that owns the
+     * transfer job.
+     * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that owns the
+     * transfer job.
+     * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + } + /** + * + * + *
+   * Request passed to RunTransferJob.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.RunTransferJobRequest} + */ + public static final class RunTransferJobRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.RunTransferJobRequest) + RunTransferJobRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use RunTransferJobRequest.newBuilder() to construct. + private RunTransferJobRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RunTransferJobRequest() { + jobName_ = ""; + projectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RunTransferJobRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RunTransferJobRequest( + 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(); + + jobName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = 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.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_RunTransferJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_RunTransferJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest.class, + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest.Builder + .class); + } + + public static final int JOB_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object jobName_; + /** + * + * + *
+     * Required. The name of the transfer job.
+     * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobName. + */ + @java.lang.Override + public java.lang.String getJobName() { + java.lang.Object ref = jobName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobName_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The name of the transfer job.
+     * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobNameBytes() { + java.lang.Object ref = jobName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROJECT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object projectId_; + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that owns the
+     * transfer job.
+     * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The ID of the Google Cloud Platform Console project that owns the
+     * transfer job.
+     * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = 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 (!getJobNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, jobName_); + } + if (!getProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getJobNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, jobName_); + } + if (!getProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + 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.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest other = + (com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest) obj; + + if (!getJobName().equals(other.getJobName())) return false; + if (!getProjectId().equals(other.getProjectId())) 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) + JOB_NAME_FIELD_NUMBER; + hash = (53 * hash) + getJobName().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest 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.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest 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.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest + 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.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest 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.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request passed to RunTransferJob.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.RunTransferJobRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.RunTransferJobRequest) + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_RunTransferJobRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_RunTransferJobRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest.class, + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest.Builder + .class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest.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(); + jobName_ = ""; + + projectId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferProto + .internal_static_google_storagetransfer_v1_RunTransferJobRequest_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest build() { + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest + buildPartial() { + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest result = + new com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest(this); + result.jobName_ = jobName_; + result.projectId_ = projectId_; + 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.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest other) { + if (other + == com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest + .getDefaultInstance()) return this; + if (!other.getJobName().isEmpty()) { + jobName_ = other.jobName_; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + 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.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object jobName_ = ""; + /** + * + * + *
+       * Required. The name of the transfer job.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The jobName. + */ + public java.lang.String getJobName() { + java.lang.Object ref = jobName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The name of the transfer job.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for jobName. + */ + public com.google.protobuf.ByteString getJobNameBytes() { + java.lang.Object ref = jobName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The name of the transfer job.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The jobName to set. + * @return This builder for chaining. + */ + public Builder setJobName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jobName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of the transfer job.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearJobName() { + + jobName_ = getDefaultInstance().getJobName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of the transfer job.
+       * 
+ * + * string job_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for jobName to set. + * @return This builder for chaining. + */ + public Builder setJobNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jobName_ = value; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * transfer job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * transfer job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * transfer job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * transfer job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The ID of the Google Cloud Platform Console project that owns the
+       * transfer job.
+       * 
+ * + * string project_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = 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.storagetransfer.v1.RunTransferJobRequest) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.RunTransferJobRequest) + private static final com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest(); + } + + public static com.google.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RunTransferJobRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunTransferJobRequest(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.storagetransfer.v1.proto.TransferProto.RunTransferJobRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_GetGoogleServiceAccountRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_GetGoogleServiceAccountRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_CreateTransferJobRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_CreateTransferJobRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_UpdateTransferJobRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_UpdateTransferJobRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_GetTransferJobRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_GetTransferJobRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_ListTransferJobsRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_ListTransferJobsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_ListTransferJobsResponse_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_ListTransferJobsResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_PauseTransferOperationRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_PauseTransferOperationRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_ResumeTransferOperationRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_ResumeTransferOperationRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_RunTransferJobRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_RunTransferJobRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n(google/storagetransfer/v1/transfer.pro" + + "to\022\031google.storagetransfer.v1\032\034google/ap" + + "i/annotations.proto\032\027google/api/client.p" + + "roto\032\037google/api/field_behavior.proto\032#g" + + "oogle/longrunning/operations.proto\032\036goog" + + "le/protobuf/duration.proto\032\033google/proto" + + "buf/empty.proto\032 google/protobuf/field_m" + + "ask.proto\032.google/storagetransfer/v1/tra" + + "nsfer_types.proto\"9\n\036GetGoogleServiceAcc" + + "ountRequest\022\027\n\nproject_id\030\001 \001(\tB\003\340A\002\"]\n\030" + + "CreateTransferJobRequest\022A\n\014transfer_job" + + "\030\001 \001(\0132&.google.storagetransfer.v1.Trans" + + "ferJobB\003\340A\002\"\321\001\n\030UpdateTransferJobRequest" + + "\022\025\n\010job_name\030\001 \001(\tB\003\340A\002\022\027\n\nproject_id\030\002 " + + "\001(\tB\003\340A\002\022A\n\014transfer_job\030\003 \001(\0132&.google." + + "storagetransfer.v1.TransferJobB\003\340A\002\022B\n\036u" + + "pdate_transfer_job_field_mask\030\004 \001(\0132\032.go" + + "ogle.protobuf.FieldMask\"G\n\025GetTransferJo" + + "bRequest\022\025\n\010job_name\030\001 \001(\tB\003\340A\002\022\027\n\nproje" + + "ct_id\030\002 \001(\tB\003\340A\002\"U\n\027ListTransferJobsRequ" + + "est\022\023\n\006filter\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030\004 " + + "\001(\005\022\022\n\npage_token\030\005 \001(\t\"r\n\030ListTransferJ" + + "obsResponse\022=\n\rtransfer_jobs\030\001 \003(\0132&.goo" + + "gle.storagetransfer.v1.TransferJob\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t\"2\n\035PauseTransferOper" + + "ationRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\"3\n\036Resum" + + "eTransferOperationRequest\022\021\n\004name\030\001 \001(\tB" + + "\003\340A\002\"G\n\025RunTransferJobRequest\022\025\n\010job_nam" + + "e\030\001 \001(\tB\003\340A\002\022\027\n\nproject_id\030\002 \001(\tB\003\340A\0022\215\013" + + "\n\026StorageTransferService\022\265\001\n\027GetGoogleSe" + + "rviceAccount\0229.google.storagetransfer.v1" + + ".GetGoogleServiceAccountRequest\032/.google" + + ".storagetransfer.v1.GoogleServiceAccount" + + "\".\202\323\344\223\002(\022&/v1/googleServiceAccounts/{pro" + + "ject_id}\022\230\001\n\021CreateTransferJob\0223.google." + + "storagetransfer.v1.CreateTransferJobRequ" + + "est\032&.google.storagetransfer.v1.Transfer" + + "Job\"&\202\323\344\223\002 \"\020/v1/transferJobs:\014transfer_" + + "job\022\233\001\n\021UpdateTransferJob\0223.google.stora" + + "getransfer.v1.UpdateTransferJobRequest\032&" + + ".google.storagetransfer.v1.TransferJob\")" + + "\202\323\344\223\002#2\036/v1/{job_name=transferJobs/**}:\001" + + "*\022\222\001\n\016GetTransferJob\0220.google.storagetra" + + "nsfer.v1.GetTransferJobRequest\032&.google." + + "storagetransfer.v1.TransferJob\"&\202\323\344\223\002 \022\036" + + "/v1/{job_name=transferJobs/**}\022\225\001\n\020ListT" + + "ransferJobs\0222.google.storagetransfer.v1." + + "ListTransferJobsRequest\0323.google.storage" + + "transfer.v1.ListTransferJobsResponse\"\030\202\323" + + "\344\223\002\022\022\020/v1/transferJobs\022\235\001\n\026PauseTransfer" + + "Operation\0228.google.storagetransfer.v1.Pa" + + "useTransferOperationRequest\032\026.google.pro" + + "tobuf.Empty\"1\202\323\344\223\002+\"&/v1/{name=transferO" + + "perations/**}:pause:\001*\022\240\001\n\027ResumeTransfe" + + "rOperation\0229.google.storagetransfer.v1.R" + + "esumeTransferOperationRequest\032\026.google.p" + + "rotobuf.Empty\"2\202\323\344\223\002,\"\'/v1/{name=transfe" + + "rOperations/**}:resume:\001*\022\275\001\n\016RunTransfe" + + "rJob\0220.google.storagetransfer.v1.RunTran" + + "sferJobRequest\032\035.google.longrunning.Oper" + + "ation\"Z\202\323\344\223\002\'\"\"/v1/{job_name=transferJob" + + "s/**}:run:\001*\312A*\n\025google.protobuf.Empty\022\021" + + "TransferOperation\032R\312A\036storagetransfer.go" + + "ogleapis.com\322A.https://www.googleapis.co" + + "m/auth/cloud-platformB\352\001\n#com.google.sto" + + "ragetransfer.v1.protoB\rTransferProtoZHgo" + + "ogle.golang.org/genproto/googleapis/stor" + + "agetransfer/v1;storagetransfer\370\001\001\252\002\037Goog" + + "le.Cloud.StorageTransfer.V1\312\002\037Google\\Clo" + + "ud\\StorageTransfer\\V1\352\002\"Google::Cloud::S" + + "torageTransfer::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.storagetransfer.v1.proto.TransferTypes.getDescriptor(), + }); + internal_static_google_storagetransfer_v1_GetGoogleServiceAccountRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_storagetransfer_v1_GetGoogleServiceAccountRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_GetGoogleServiceAccountRequest_descriptor, + new java.lang.String[] { + "ProjectId", + }); + internal_static_google_storagetransfer_v1_CreateTransferJobRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_storagetransfer_v1_CreateTransferJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_CreateTransferJobRequest_descriptor, + new java.lang.String[] { + "TransferJob", + }); + internal_static_google_storagetransfer_v1_UpdateTransferJobRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_storagetransfer_v1_UpdateTransferJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_UpdateTransferJobRequest_descriptor, + new java.lang.String[] { + "JobName", "ProjectId", "TransferJob", "UpdateTransferJobFieldMask", + }); + internal_static_google_storagetransfer_v1_GetTransferJobRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_storagetransfer_v1_GetTransferJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_GetTransferJobRequest_descriptor, + new java.lang.String[] { + "JobName", "ProjectId", + }); + internal_static_google_storagetransfer_v1_ListTransferJobsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_storagetransfer_v1_ListTransferJobsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_ListTransferJobsRequest_descriptor, + new java.lang.String[] { + "Filter", "PageSize", "PageToken", + }); + internal_static_google_storagetransfer_v1_ListTransferJobsResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_storagetransfer_v1_ListTransferJobsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_ListTransferJobsResponse_descriptor, + new java.lang.String[] { + "TransferJobs", "NextPageToken", + }); + internal_static_google_storagetransfer_v1_PauseTransferOperationRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_storagetransfer_v1_PauseTransferOperationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_PauseTransferOperationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_storagetransfer_v1_ResumeTransferOperationRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_storagetransfer_v1_ResumeTransferOperationRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_ResumeTransferOperationRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_storagetransfer_v1_RunTransferJobRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_storagetransfer_v1_RunTransferJobRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_RunTransferJobRequest_descriptor, + new java.lang.String[] { + "JobName", "ProjectId", + }); + 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.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.storagetransfer.v1.proto.TransferTypes.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-storage-transfer-v1/src/main/java/com/google/storagetransfer/v1/proto/TransferTypes.java b/proto-google-cloud-storage-transfer-v1/src/main/java/com/google/storagetransfer/v1/proto/TransferTypes.java new file mode 100644 index 0000000..2c02685 --- /dev/null +++ b/proto-google-cloud-storage-transfer-v1/src/main/java/com/google/storagetransfer/v1/proto/TransferTypes.java @@ -0,0 +1,31789 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/storagetransfer/v1/transfer_types.proto + +package com.google.storagetransfer.v1.proto; + +public final class TransferTypes { + private TransferTypes() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public interface GoogleServiceAccountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.GoogleServiceAccount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Email address of the service account.
+     * 
+ * + * string account_email = 1; + * + * @return The accountEmail. + */ + java.lang.String getAccountEmail(); + /** + * + * + *
+     * Email address of the service account.
+     * 
+ * + * string account_email = 1; + * + * @return The bytes for accountEmail. + */ + com.google.protobuf.ByteString getAccountEmailBytes(); + + /** + * + * + *
+     * Unique identifier for the service account.
+     * 
+ * + * string subject_id = 2; + * + * @return The subjectId. + */ + java.lang.String getSubjectId(); + /** + * + * + *
+     * Unique identifier for the service account.
+     * 
+ * + * string subject_id = 2; + * + * @return The bytes for subjectId. + */ + com.google.protobuf.ByteString getSubjectIdBytes(); + } + /** + * + * + *
+   * Google service account
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.GoogleServiceAccount} + */ + public static final class GoogleServiceAccount extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.GoogleServiceAccount) + GoogleServiceAccountOrBuilder { + private static final long serialVersionUID = 0L; + // Use GoogleServiceAccount.newBuilder() to construct. + private GoogleServiceAccount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GoogleServiceAccount() { + accountEmail_ = ""; + subjectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GoogleServiceAccount(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GoogleServiceAccount( + 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(); + + accountEmail_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + subjectId_ = 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.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_GoogleServiceAccount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_GoogleServiceAccount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount.class, + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount.Builder.class); + } + + public static final int ACCOUNT_EMAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object accountEmail_; + /** + * + * + *
+     * Email address of the service account.
+     * 
+ * + * string account_email = 1; + * + * @return The accountEmail. + */ + @java.lang.Override + public java.lang.String getAccountEmail() { + java.lang.Object ref = accountEmail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountEmail_ = s; + return s; + } + } + /** + * + * + *
+     * Email address of the service account.
+     * 
+ * + * string account_email = 1; + * + * @return The bytes for accountEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountEmailBytes() { + java.lang.Object ref = accountEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBJECT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object subjectId_; + /** + * + * + *
+     * Unique identifier for the service account.
+     * 
+ * + * string subject_id = 2; + * + * @return The subjectId. + */ + @java.lang.Override + public java.lang.String getSubjectId() { + java.lang.Object ref = subjectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectId_ = s; + return s; + } + } + /** + * + * + *
+     * Unique identifier for the service account.
+     * 
+ * + * string subject_id = 2; + * + * @return The bytes for subjectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubjectIdBytes() { + java.lang.Object ref = subjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subjectId_ = 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 (!getAccountEmailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, accountEmail_); + } + if (!getSubjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subjectId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAccountEmailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, accountEmail_); + } + if (!getSubjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subjectId_); + } + 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.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount other = + (com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount) obj; + + if (!getAccountEmail().equals(other.getAccountEmail())) return false; + if (!getSubjectId().equals(other.getSubjectId())) 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) + ACCOUNT_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getAccountEmail().hashCode(); + hash = (37 * hash) + SUBJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubjectId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount 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.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount 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.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount + 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.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount 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.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount 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; + } + /** + * + * + *
+     * Google service account
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.GoogleServiceAccount} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.GoogleServiceAccount) + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_GoogleServiceAccount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_GoogleServiceAccount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount.class, + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount.Builder + .class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount.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(); + accountEmail_ = ""; + + subjectId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_GoogleServiceAccount_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount build() { + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount result = + new com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount(this); + result.accountEmail_ = accountEmail_; + result.subjectId_ = subjectId_; + 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.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount + .getDefaultInstance()) return this; + if (!other.getAccountEmail().isEmpty()) { + accountEmail_ = other.accountEmail_; + onChanged(); + } + if (!other.getSubjectId().isEmpty()) { + subjectId_ = other.subjectId_; + 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.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object accountEmail_ = ""; + /** + * + * + *
+       * Email address of the service account.
+       * 
+ * + * string account_email = 1; + * + * @return The accountEmail. + */ + public java.lang.String getAccountEmail() { + java.lang.Object ref = accountEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accountEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Email address of the service account.
+       * 
+ * + * string account_email = 1; + * + * @return The bytes for accountEmail. + */ + public com.google.protobuf.ByteString getAccountEmailBytes() { + java.lang.Object ref = accountEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accountEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Email address of the service account.
+       * 
+ * + * string account_email = 1; + * + * @param value The accountEmail to set. + * @return This builder for chaining. + */ + public Builder setAccountEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + accountEmail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Email address of the service account.
+       * 
+ * + * string account_email = 1; + * + * @return This builder for chaining. + */ + public Builder clearAccountEmail() { + + accountEmail_ = getDefaultInstance().getAccountEmail(); + onChanged(); + return this; + } + /** + * + * + *
+       * Email address of the service account.
+       * 
+ * + * string account_email = 1; + * + * @param value The bytes for accountEmail to set. + * @return This builder for chaining. + */ + public Builder setAccountEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + accountEmail_ = value; + onChanged(); + return this; + } + + private java.lang.Object subjectId_ = ""; + /** + * + * + *
+       * Unique identifier for the service account.
+       * 
+ * + * string subject_id = 2; + * + * @return The subjectId. + */ + public java.lang.String getSubjectId() { + java.lang.Object ref = subjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subjectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Unique identifier for the service account.
+       * 
+ * + * string subject_id = 2; + * + * @return The bytes for subjectId. + */ + public com.google.protobuf.ByteString getSubjectIdBytes() { + java.lang.Object ref = subjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Unique identifier for the service account.
+       * 
+ * + * string subject_id = 2; + * + * @param value The subjectId to set. + * @return This builder for chaining. + */ + public Builder setSubjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + subjectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Unique identifier for the service account.
+       * 
+ * + * string subject_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearSubjectId() { + + subjectId_ = getDefaultInstance().getSubjectId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Unique identifier for the service account.
+       * 
+ * + * string subject_id = 2; + * + * @param value The bytes for subjectId to set. + * @return This builder for chaining. + */ + public Builder setSubjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + subjectId_ = 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.storagetransfer.v1.GoogleServiceAccount) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.GoogleServiceAccount) + private static final com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GoogleServiceAccount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GoogleServiceAccount(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.storagetransfer.v1.proto.TransferTypes.GoogleServiceAccount + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AwsAccessKeyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.AwsAccessKey) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. AWS access key ID.
+     * 
+ * + * string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The accessKeyId. + */ + java.lang.String getAccessKeyId(); + /** + * + * + *
+     * Required. AWS access key ID.
+     * 
+ * + * string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for accessKeyId. + */ + com.google.protobuf.ByteString getAccessKeyIdBytes(); + + /** + * + * + *
+     * Required. AWS secret access key. This field is not returned in RPC
+     * responses.
+     * 
+ * + * string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The secretAccessKey. + */ + java.lang.String getSecretAccessKey(); + /** + * + * + *
+     * Required. AWS secret access key. This field is not returned in RPC
+     * responses.
+     * 
+ * + * string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for secretAccessKey. + */ + com.google.protobuf.ByteString getSecretAccessKeyBytes(); + } + /** + * + * + *
+   * AWS access key (see
+   * [AWS Security
+   * Credentials](https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).
+   * For information on our data retention policy for user credentials, see
+   * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.AwsAccessKey} + */ + public static final class AwsAccessKey extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.AwsAccessKey) + AwsAccessKeyOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsAccessKey.newBuilder() to construct. + private AwsAccessKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsAccessKey() { + accessKeyId_ = ""; + secretAccessKey_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsAccessKey(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsAccessKey( + 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(); + + accessKeyId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + secretAccessKey_ = 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.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AwsAccessKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AwsAccessKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.class, + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.Builder.class); + } + + public static final int ACCESS_KEY_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object accessKeyId_; + /** + * + * + *
+     * Required. AWS access key ID.
+     * 
+ * + * string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The accessKeyId. + */ + @java.lang.Override + public java.lang.String getAccessKeyId() { + java.lang.Object ref = accessKeyId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessKeyId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. AWS access key ID.
+     * 
+ * + * string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for accessKeyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccessKeyIdBytes() { + java.lang.Object ref = accessKeyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessKeyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SECRET_ACCESS_KEY_FIELD_NUMBER = 2; + private volatile java.lang.Object secretAccessKey_; + /** + * + * + *
+     * Required. AWS secret access key. This field is not returned in RPC
+     * responses.
+     * 
+ * + * string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The secretAccessKey. + */ + @java.lang.Override + public java.lang.String getSecretAccessKey() { + java.lang.Object ref = secretAccessKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretAccessKey_ = s; + return s; + } + } + /** + * + * + *
+     * Required. AWS secret access key. This field is not returned in RPC
+     * responses.
+     * 
+ * + * string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for secretAccessKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSecretAccessKeyBytes() { + java.lang.Object ref = secretAccessKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretAccessKey_ = 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 (!getAccessKeyIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, accessKeyId_); + } + if (!getSecretAccessKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, secretAccessKey_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAccessKeyIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, accessKeyId_); + } + if (!getSecretAccessKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, secretAccessKey_); + } + 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.storagetransfer.v1.proto.TransferTypes.AwsAccessKey)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey other = + (com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey) obj; + + if (!getAccessKeyId().equals(other.getAccessKeyId())) return false; + if (!getSecretAccessKey().equals(other.getSecretAccessKey())) 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) + ACCESS_KEY_ID_FIELD_NUMBER; + hash = (53 * hash) + getAccessKeyId().hashCode(); + hash = (37 * hash) + SECRET_ACCESS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getSecretAccessKey().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey 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.storagetransfer.v1.proto.TransferTypes.AwsAccessKey parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey 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.storagetransfer.v1.proto.TransferTypes.AwsAccessKey parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey 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.storagetransfer.v1.proto.TransferTypes.AwsAccessKey parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey 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.storagetransfer.v1.proto.TransferTypes.AwsAccessKey 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; + } + /** + * + * + *
+     * AWS access key (see
+     * [AWS Security
+     * Credentials](https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)).
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.AwsAccessKey} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.AwsAccessKey) + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AwsAccessKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AwsAccessKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.class, + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.Builder.class); + } + + // Construct using com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.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(); + accessKeyId_ = ""; + + secretAccessKey_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AwsAccessKey_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey build() { + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey result = + new com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey(this); + result.accessKeyId_ = accessKeyId_; + result.secretAccessKey_ = secretAccessKey_; + 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.storagetransfer.v1.proto.TransferTypes.AwsAccessKey) { + return mergeFrom((com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.getDefaultInstance()) + return this; + if (!other.getAccessKeyId().isEmpty()) { + accessKeyId_ = other.accessKeyId_; + onChanged(); + } + if (!other.getSecretAccessKey().isEmpty()) { + secretAccessKey_ = other.secretAccessKey_; + 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.storagetransfer.v1.proto.TransferTypes.AwsAccessKey parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object accessKeyId_ = ""; + /** + * + * + *
+       * Required. AWS access key ID.
+       * 
+ * + * string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The accessKeyId. + */ + public java.lang.String getAccessKeyId() { + java.lang.Object ref = accessKeyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + accessKeyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. AWS access key ID.
+       * 
+ * + * string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for accessKeyId. + */ + public com.google.protobuf.ByteString getAccessKeyIdBytes() { + java.lang.Object ref = accessKeyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + accessKeyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. AWS access key ID.
+       * 
+ * + * string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The accessKeyId to set. + * @return This builder for chaining. + */ + public Builder setAccessKeyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + accessKeyId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. AWS access key ID.
+       * 
+ * + * string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAccessKeyId() { + + accessKeyId_ = getDefaultInstance().getAccessKeyId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. AWS access key ID.
+       * 
+ * + * string access_key_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for accessKeyId to set. + * @return This builder for chaining. + */ + public Builder setAccessKeyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + accessKeyId_ = value; + onChanged(); + return this; + } + + private java.lang.Object secretAccessKey_ = ""; + /** + * + * + *
+       * Required. AWS secret access key. This field is not returned in RPC
+       * responses.
+       * 
+ * + * string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The secretAccessKey. + */ + public java.lang.String getSecretAccessKey() { + java.lang.Object ref = secretAccessKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + secretAccessKey_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. AWS secret access key. This field is not returned in RPC
+       * responses.
+       * 
+ * + * string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for secretAccessKey. + */ + public com.google.protobuf.ByteString getSecretAccessKeyBytes() { + java.lang.Object ref = secretAccessKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + secretAccessKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. AWS secret access key. This field is not returned in RPC
+       * responses.
+       * 
+ * + * string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The secretAccessKey to set. + * @return This builder for chaining. + */ + public Builder setSecretAccessKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + secretAccessKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. AWS secret access key. This field is not returned in RPC
+       * responses.
+       * 
+ * + * string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSecretAccessKey() { + + secretAccessKey_ = getDefaultInstance().getSecretAccessKey(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. AWS secret access key. This field is not returned in RPC
+       * responses.
+       * 
+ * + * string secret_access_key = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for secretAccessKey to set. + * @return This builder for chaining. + */ + public Builder setSecretAccessKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + secretAccessKey_ = 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.storagetransfer.v1.AwsAccessKey) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.AwsAccessKey) + private static final com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsAccessKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsAccessKey(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.storagetransfer.v1.proto.TransferTypes.AwsAccessKey + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AzureCredentialsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.AzureCredentials) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Azure shared access signature (SAS).
+     * <aside class="note">
+     * <strong>Note:</strong>Copying data from Azure Data Lake
+     * Storage (ADLS) Gen 2 is in [Preview](/products/#product-launch-stages).
+     * During Preview, if you are copying data from ADLS Gen 2, you must use an
+     * account SAS.
+     * </aside>
+     * For more information about SAS, see
+     * [Grant limited access to Azure Storage resources using shared access
+     * signatures
+     * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview).
+     * 
+ * + * string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sasToken. + */ + java.lang.String getSasToken(); + /** + * + * + *
+     * Required. Azure shared access signature (SAS).
+     * <aside class="note">
+     * <strong>Note:</strong>Copying data from Azure Data Lake
+     * Storage (ADLS) Gen 2 is in [Preview](/products/#product-launch-stages).
+     * During Preview, if you are copying data from ADLS Gen 2, you must use an
+     * account SAS.
+     * </aside>
+     * For more information about SAS, see
+     * [Grant limited access to Azure Storage resources using shared access
+     * signatures
+     * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview).
+     * 
+ * + * string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sasToken. + */ + com.google.protobuf.ByteString getSasTokenBytes(); + } + /** + * + * + *
+   * Azure credentials
+   * For information on our data retention policy for user credentials, see
+   * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.AzureCredentials} + */ + public static final class AzureCredentials extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.AzureCredentials) + AzureCredentialsOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureCredentials.newBuilder() to construct. + private AzureCredentials(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureCredentials() { + sasToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureCredentials(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureCredentials( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + sasToken_ = 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.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AzureCredentials_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AzureCredentials_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.class, + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.Builder.class); + } + + public static final int SAS_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object sasToken_; + /** + * + * + *
+     * Required. Azure shared access signature (SAS).
+     * <aside class="note">
+     * <strong>Note:</strong>Copying data from Azure Data Lake
+     * Storage (ADLS) Gen 2 is in [Preview](/products/#product-launch-stages).
+     * During Preview, if you are copying data from ADLS Gen 2, you must use an
+     * account SAS.
+     * </aside>
+     * For more information about SAS, see
+     * [Grant limited access to Azure Storage resources using shared access
+     * signatures
+     * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview).
+     * 
+ * + * string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sasToken. + */ + @java.lang.Override + public java.lang.String getSasToken() { + java.lang.Object ref = sasToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sasToken_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Azure shared access signature (SAS).
+     * <aside class="note">
+     * <strong>Note:</strong>Copying data from Azure Data Lake
+     * Storage (ADLS) Gen 2 is in [Preview](/products/#product-launch-stages).
+     * During Preview, if you are copying data from ADLS Gen 2, you must use an
+     * account SAS.
+     * </aside>
+     * For more information about SAS, see
+     * [Grant limited access to Azure Storage resources using shared access
+     * signatures
+     * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview).
+     * 
+ * + * string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sasToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSasTokenBytes() { + java.lang.Object ref = sasToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sasToken_ = 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 (!getSasTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sasToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSasTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sasToken_); + } + 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.storagetransfer.v1.proto.TransferTypes.AzureCredentials)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials other = + (com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials) obj; + + if (!getSasToken().equals(other.getSasToken())) 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) + SAS_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getSasToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials 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.storagetransfer.v1.proto.TransferTypes.AzureCredentials parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials 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.storagetransfer.v1.proto.TransferTypes.AzureCredentials + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials + 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.storagetransfer.v1.proto.TransferTypes.AzureCredentials parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials 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.storagetransfer.v1.proto.TransferTypes.AzureCredentials 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; + } + /** + * + * + *
+     * Azure credentials
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.AzureCredentials} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.AzureCredentials) + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentialsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AzureCredentials_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AzureCredentials_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.class, + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.Builder.class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.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(); + sasToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AzureCredentials_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials build() { + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials result = + new com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials(this); + result.sasToken_ = sasToken_; + 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.storagetransfer.v1.proto.TransferTypes.AzureCredentials) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials + .getDefaultInstance()) return this; + if (!other.getSasToken().isEmpty()) { + sasToken_ = other.sasToken_; + 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.storagetransfer.v1.proto.TransferTypes.AzureCredentials parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object sasToken_ = ""; + /** + * + * + *
+       * Required. Azure shared access signature (SAS).
+       * <aside class="note">
+       * <strong>Note:</strong>Copying data from Azure Data Lake
+       * Storage (ADLS) Gen 2 is in [Preview](/products/#product-launch-stages).
+       * During Preview, if you are copying data from ADLS Gen 2, you must use an
+       * account SAS.
+       * </aside>
+       * For more information about SAS, see
+       * [Grant limited access to Azure Storage resources using shared access
+       * signatures
+       * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview).
+       * 
+ * + * string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sasToken. + */ + public java.lang.String getSasToken() { + java.lang.Object ref = sasToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sasToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Azure shared access signature (SAS).
+       * <aside class="note">
+       * <strong>Note:</strong>Copying data from Azure Data Lake
+       * Storage (ADLS) Gen 2 is in [Preview](/products/#product-launch-stages).
+       * During Preview, if you are copying data from ADLS Gen 2, you must use an
+       * account SAS.
+       * </aside>
+       * For more information about SAS, see
+       * [Grant limited access to Azure Storage resources using shared access
+       * signatures
+       * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview).
+       * 
+ * + * string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sasToken. + */ + public com.google.protobuf.ByteString getSasTokenBytes() { + java.lang.Object ref = sasToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sasToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Azure shared access signature (SAS).
+       * <aside class="note">
+       * <strong>Note:</strong>Copying data from Azure Data Lake
+       * Storage (ADLS) Gen 2 is in [Preview](/products/#product-launch-stages).
+       * During Preview, if you are copying data from ADLS Gen 2, you must use an
+       * account SAS.
+       * </aside>
+       * For more information about SAS, see
+       * [Grant limited access to Azure Storage resources using shared access
+       * signatures
+       * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview).
+       * 
+ * + * string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The sasToken to set. + * @return This builder for chaining. + */ + public Builder setSasToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sasToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Azure shared access signature (SAS).
+       * <aside class="note">
+       * <strong>Note:</strong>Copying data from Azure Data Lake
+       * Storage (ADLS) Gen 2 is in [Preview](/products/#product-launch-stages).
+       * During Preview, if you are copying data from ADLS Gen 2, you must use an
+       * account SAS.
+       * </aside>
+       * For more information about SAS, see
+       * [Grant limited access to Azure Storage resources using shared access
+       * signatures
+       * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview).
+       * 
+ * + * string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSasToken() { + + sasToken_ = getDefaultInstance().getSasToken(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Azure shared access signature (SAS).
+       * <aside class="note">
+       * <strong>Note:</strong>Copying data from Azure Data Lake
+       * Storage (ADLS) Gen 2 is in [Preview](/products/#product-launch-stages).
+       * During Preview, if you are copying data from ADLS Gen 2, you must use an
+       * account SAS.
+       * </aside>
+       * For more information about SAS, see
+       * [Grant limited access to Azure Storage resources using shared access
+       * signatures
+       * (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview).
+       * 
+ * + * string sas_token = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for sasToken to set. + * @return This builder for chaining. + */ + public Builder setSasTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sasToken_ = 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.storagetransfer.v1.AzureCredentials) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.AzureCredentials) + private static final com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureCredentials parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureCredentials(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.storagetransfer.v1.proto.TransferTypes.AzureCredentials + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ObjectConditionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.ObjectConditions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If specified, only objects with a "last modification time" before
+     * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+     *  have a "last modification time" are transferred.
+     * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+     * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+     * refers to the [start_time]
+     * [google.storagetransfer.v1.TransferOperation.start_time] of the
+     * `TransferOperation`.
+     * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + * + * @return Whether the minTimeElapsedSinceLastModification field is set. + */ + boolean hasMinTimeElapsedSinceLastModification(); + /** + * + * + *
+     * If specified, only objects with a "last modification time" before
+     * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+     *  have a "last modification time" are transferred.
+     * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+     * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+     * refers to the [start_time]
+     * [google.storagetransfer.v1.TransferOperation.start_time] of the
+     * `TransferOperation`.
+     * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + * + * @return The minTimeElapsedSinceLastModification. + */ + com.google.protobuf.Duration getMinTimeElapsedSinceLastModification(); + /** + * + * + *
+     * If specified, only objects with a "last modification time" before
+     * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+     *  have a "last modification time" are transferred.
+     * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+     * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+     * refers to the [start_time]
+     * [google.storagetransfer.v1.TransferOperation.start_time] of the
+     * `TransferOperation`.
+     * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + */ + com.google.protobuf.DurationOrBuilder getMinTimeElapsedSinceLastModificationOrBuilder(); + + /** + * + * + *
+     * If specified, only objects with a "last modification time" on or after
+     * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+     * have a "last modification time" are transferred.
+     * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+     * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+     * `NOW` refers to the [start_time]
+     * [google.storagetransfer.v1.TransferOperation.start_time] of the
+     * `TransferOperation`.
+     * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + * + * @return Whether the maxTimeElapsedSinceLastModification field is set. + */ + boolean hasMaxTimeElapsedSinceLastModification(); + /** + * + * + *
+     * If specified, only objects with a "last modification time" on or after
+     * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+     * have a "last modification time" are transferred.
+     * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+     * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+     * `NOW` refers to the [start_time]
+     * [google.storagetransfer.v1.TransferOperation.start_time] of the
+     * `TransferOperation`.
+     * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + * + * @return The maxTimeElapsedSinceLastModification. + */ + com.google.protobuf.Duration getMaxTimeElapsedSinceLastModification(); + /** + * + * + *
+     * If specified, only objects with a "last modification time" on or after
+     * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+     * have a "last modification time" are transferred.
+     * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+     * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+     * `NOW` refers to the [start_time]
+     * [google.storagetransfer.v1.TransferOperation.start_time] of the
+     * `TransferOperation`.
+     * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + */ + com.google.protobuf.DurationOrBuilder getMaxTimeElapsedSinceLastModificationOrBuilder(); + + /** + * + * + *
+     * If you specify `include_prefixes`, Storage Transfer Service uses the items
+     * in the `include_prefixes` array to determine which objects to include in a
+     * transfer. Objects must start with one of the matching `include_prefixes`
+     * for inclusion in the transfer. If [exclude_prefixes]
+     * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+     * objects must not start with any of the `exclude_prefixes` specified for
+     * inclusion in the transfer.
+     * The following are requirements of `include_prefixes`:
+     *   * Each include-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each include-prefix must omit the leading slash. For example, to
+     *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the include-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the include-prefix values can be empty, if specified.
+     *   * Each include-prefix must include a distinct portion of the object
+     *     namespace. No include-prefix may be a prefix of another
+     *     include-prefix.
+     * The max size of `include_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string include_prefixes = 3; + * + * @return A list containing the includePrefixes. + */ + java.util.List getIncludePrefixesList(); + /** + * + * + *
+     * If you specify `include_prefixes`, Storage Transfer Service uses the items
+     * in the `include_prefixes` array to determine which objects to include in a
+     * transfer. Objects must start with one of the matching `include_prefixes`
+     * for inclusion in the transfer. If [exclude_prefixes]
+     * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+     * objects must not start with any of the `exclude_prefixes` specified for
+     * inclusion in the transfer.
+     * The following are requirements of `include_prefixes`:
+     *   * Each include-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each include-prefix must omit the leading slash. For example, to
+     *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the include-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the include-prefix values can be empty, if specified.
+     *   * Each include-prefix must include a distinct portion of the object
+     *     namespace. No include-prefix may be a prefix of another
+     *     include-prefix.
+     * The max size of `include_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string include_prefixes = 3; + * + * @return The count of includePrefixes. + */ + int getIncludePrefixesCount(); + /** + * + * + *
+     * If you specify `include_prefixes`, Storage Transfer Service uses the items
+     * in the `include_prefixes` array to determine which objects to include in a
+     * transfer. Objects must start with one of the matching `include_prefixes`
+     * for inclusion in the transfer. If [exclude_prefixes]
+     * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+     * objects must not start with any of the `exclude_prefixes` specified for
+     * inclusion in the transfer.
+     * The following are requirements of `include_prefixes`:
+     *   * Each include-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each include-prefix must omit the leading slash. For example, to
+     *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the include-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the include-prefix values can be empty, if specified.
+     *   * Each include-prefix must include a distinct portion of the object
+     *     namespace. No include-prefix may be a prefix of another
+     *     include-prefix.
+     * The max size of `include_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string include_prefixes = 3; + * + * @param index The index of the element to return. + * @return The includePrefixes at the given index. + */ + java.lang.String getIncludePrefixes(int index); + /** + * + * + *
+     * If you specify `include_prefixes`, Storage Transfer Service uses the items
+     * in the `include_prefixes` array to determine which objects to include in a
+     * transfer. Objects must start with one of the matching `include_prefixes`
+     * for inclusion in the transfer. If [exclude_prefixes]
+     * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+     * objects must not start with any of the `exclude_prefixes` specified for
+     * inclusion in the transfer.
+     * The following are requirements of `include_prefixes`:
+     *   * Each include-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each include-prefix must omit the leading slash. For example, to
+     *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the include-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the include-prefix values can be empty, if specified.
+     *   * Each include-prefix must include a distinct portion of the object
+     *     namespace. No include-prefix may be a prefix of another
+     *     include-prefix.
+     * The max size of `include_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string include_prefixes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the includePrefixes at the given index. + */ + com.google.protobuf.ByteString getIncludePrefixesBytes(int index); + + /** + * + * + *
+     * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+     * in the `exclude_prefixes` array to determine which objects to exclude from
+     * a transfer. Objects must not start with one of the matching
+     * `exclude_prefixes` for inclusion in a transfer.
+     * The following are requirements of `exclude_prefixes`:
+     *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each exclude-prefix must omit the leading slash. For example, to
+     *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the exclude-prefix values can be empty, if specified.
+     *   * Each exclude-prefix must exclude a distinct portion of the object
+     *     namespace. No exclude-prefix may be a prefix of another
+     *     exclude-prefix.
+     *   * If [include_prefixes]
+     *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+     *     specified, then each exclude-prefix must start with the value of a path
+     *     explicitly included by `include_prefixes`.
+     * The max size of `exclude_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string exclude_prefixes = 4; + * + * @return A list containing the excludePrefixes. + */ + java.util.List getExcludePrefixesList(); + /** + * + * + *
+     * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+     * in the `exclude_prefixes` array to determine which objects to exclude from
+     * a transfer. Objects must not start with one of the matching
+     * `exclude_prefixes` for inclusion in a transfer.
+     * The following are requirements of `exclude_prefixes`:
+     *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each exclude-prefix must omit the leading slash. For example, to
+     *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the exclude-prefix values can be empty, if specified.
+     *   * Each exclude-prefix must exclude a distinct portion of the object
+     *     namespace. No exclude-prefix may be a prefix of another
+     *     exclude-prefix.
+     *   * If [include_prefixes]
+     *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+     *     specified, then each exclude-prefix must start with the value of a path
+     *     explicitly included by `include_prefixes`.
+     * The max size of `exclude_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string exclude_prefixes = 4; + * + * @return The count of excludePrefixes. + */ + int getExcludePrefixesCount(); + /** + * + * + *
+     * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+     * in the `exclude_prefixes` array to determine which objects to exclude from
+     * a transfer. Objects must not start with one of the matching
+     * `exclude_prefixes` for inclusion in a transfer.
+     * The following are requirements of `exclude_prefixes`:
+     *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each exclude-prefix must omit the leading slash. For example, to
+     *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the exclude-prefix values can be empty, if specified.
+     *   * Each exclude-prefix must exclude a distinct portion of the object
+     *     namespace. No exclude-prefix may be a prefix of another
+     *     exclude-prefix.
+     *   * If [include_prefixes]
+     *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+     *     specified, then each exclude-prefix must start with the value of a path
+     *     explicitly included by `include_prefixes`.
+     * The max size of `exclude_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string exclude_prefixes = 4; + * + * @param index The index of the element to return. + * @return The excludePrefixes at the given index. + */ + java.lang.String getExcludePrefixes(int index); + /** + * + * + *
+     * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+     * in the `exclude_prefixes` array to determine which objects to exclude from
+     * a transfer. Objects must not start with one of the matching
+     * `exclude_prefixes` for inclusion in a transfer.
+     * The following are requirements of `exclude_prefixes`:
+     *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each exclude-prefix must omit the leading slash. For example, to
+     *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the exclude-prefix values can be empty, if specified.
+     *   * Each exclude-prefix must exclude a distinct portion of the object
+     *     namespace. No exclude-prefix may be a prefix of another
+     *     exclude-prefix.
+     *   * If [include_prefixes]
+     *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+     *     specified, then each exclude-prefix must start with the value of a path
+     *     explicitly included by `include_prefixes`.
+     * The max size of `exclude_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string exclude_prefixes = 4; + * + * @param index The index of the value to return. + * @return The bytes of the excludePrefixes at the given index. + */ + com.google.protobuf.ByteString getExcludePrefixesBytes(int index); + + /** + * + * + *
+     * If specified, only objects with a "last modification time" on or after
+     * this timestamp and objects that don't have a "last modification time" are
+     * transferred.
+     * The `last_modified_since` and `last_modified_before` fields can be used
+     * together for chunked data processing. For example, consider a script that
+     * processes each day's worth of data at a time. For that you'd set each
+     * of the fields as follows:
+     * *  `last_modified_since` to the start of the day
+     * *  `last_modified_before` to the end of the day
+     * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + * + * @return Whether the lastModifiedSince field is set. + */ + boolean hasLastModifiedSince(); + /** + * + * + *
+     * If specified, only objects with a "last modification time" on or after
+     * this timestamp and objects that don't have a "last modification time" are
+     * transferred.
+     * The `last_modified_since` and `last_modified_before` fields can be used
+     * together for chunked data processing. For example, consider a script that
+     * processes each day's worth of data at a time. For that you'd set each
+     * of the fields as follows:
+     * *  `last_modified_since` to the start of the day
+     * *  `last_modified_before` to the end of the day
+     * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + * + * @return The lastModifiedSince. + */ + com.google.protobuf.Timestamp getLastModifiedSince(); + /** + * + * + *
+     * If specified, only objects with a "last modification time" on or after
+     * this timestamp and objects that don't have a "last modification time" are
+     * transferred.
+     * The `last_modified_since` and `last_modified_before` fields can be used
+     * together for chunked data processing. For example, consider a script that
+     * processes each day's worth of data at a time. For that you'd set each
+     * of the fields as follows:
+     * *  `last_modified_since` to the start of the day
+     * *  `last_modified_before` to the end of the day
+     * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + */ + com.google.protobuf.TimestampOrBuilder getLastModifiedSinceOrBuilder(); + + /** + * + * + *
+     * If specified, only objects with a "last modification time" before this
+     * timestamp and objects that don't have a "last modification time" will be
+     * transferred.
+     * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + * + * @return Whether the lastModifiedBefore field is set. + */ + boolean hasLastModifiedBefore(); + /** + * + * + *
+     * If specified, only objects with a "last modification time" before this
+     * timestamp and objects that don't have a "last modification time" will be
+     * transferred.
+     * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + * + * @return The lastModifiedBefore. + */ + com.google.protobuf.Timestamp getLastModifiedBefore(); + /** + * + * + *
+     * If specified, only objects with a "last modification time" before this
+     * timestamp and objects that don't have a "last modification time" will be
+     * transferred.
+     * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + */ + com.google.protobuf.TimestampOrBuilder getLastModifiedBeforeOrBuilder(); + } + /** + * + * + *
+   * Conditions that determine which objects will be transferred. Applies only
+   * to Cloud Data Sources such as S3, Azure, and Cloud Storage.
+   * The "last modification time" refers to the time of the
+   * last change to the object's content or metadata — specifically, this is
+   * the `updated` property of Cloud Storage objects, the `LastModified` field
+   * of S3 objects, and the `Last-Modified` header of Azure blobs.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.ObjectConditions} + */ + public static final class ObjectConditions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.ObjectConditions) + ObjectConditionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ObjectConditions.newBuilder() to construct. + private ObjectConditions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ObjectConditions() { + includePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + excludePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ObjectConditions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ObjectConditions( + 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.protobuf.Duration.Builder subBuilder = null; + if (minTimeElapsedSinceLastModification_ != null) { + subBuilder = minTimeElapsedSinceLastModification_.toBuilder(); + } + minTimeElapsedSinceLastModification_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minTimeElapsedSinceLastModification_); + minTimeElapsedSinceLastModification_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (maxTimeElapsedSinceLastModification_ != null) { + subBuilder = maxTimeElapsedSinceLastModification_.toBuilder(); + } + maxTimeElapsedSinceLastModification_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxTimeElapsedSinceLastModification_); + maxTimeElapsedSinceLastModification_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + includePrefixes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + includePrefixes_.add(s); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + excludePrefixes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + excludePrefixes_.add(s); + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastModifiedSince_ != null) { + subBuilder = lastModifiedSince_.toBuilder(); + } + lastModifiedSince_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastModifiedSince_); + lastModifiedSince_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastModifiedBefore_ != null) { + subBuilder = lastModifiedBefore_.toBuilder(); + } + lastModifiedBefore_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastModifiedBefore_); + lastModifiedBefore_ = 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)) { + includePrefixes_ = includePrefixes_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + excludePrefixes_ = excludePrefixes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ObjectConditions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ObjectConditions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.class, + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.Builder.class); + } + + public static final int MIN_TIME_ELAPSED_SINCE_LAST_MODIFICATION_FIELD_NUMBER = 1; + private com.google.protobuf.Duration minTimeElapsedSinceLastModification_; + /** + * + * + *
+     * If specified, only objects with a "last modification time" before
+     * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+     *  have a "last modification time" are transferred.
+     * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+     * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+     * refers to the [start_time]
+     * [google.storagetransfer.v1.TransferOperation.start_time] of the
+     * `TransferOperation`.
+     * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + * + * @return Whether the minTimeElapsedSinceLastModification field is set. + */ + @java.lang.Override + public boolean hasMinTimeElapsedSinceLastModification() { + return minTimeElapsedSinceLastModification_ != null; + } + /** + * + * + *
+     * If specified, only objects with a "last modification time" before
+     * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+     *  have a "last modification time" are transferred.
+     * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+     * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+     * refers to the [start_time]
+     * [google.storagetransfer.v1.TransferOperation.start_time] of the
+     * `TransferOperation`.
+     * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + * + * @return The minTimeElapsedSinceLastModification. + */ + @java.lang.Override + public com.google.protobuf.Duration getMinTimeElapsedSinceLastModification() { + return minTimeElapsedSinceLastModification_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minTimeElapsedSinceLastModification_; + } + /** + * + * + *
+     * If specified, only objects with a "last modification time" before
+     * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+     *  have a "last modification time" are transferred.
+     * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+     * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+     * refers to the [start_time]
+     * [google.storagetransfer.v1.TransferOperation.start_time] of the
+     * `TransferOperation`.
+     * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMinTimeElapsedSinceLastModificationOrBuilder() { + return getMinTimeElapsedSinceLastModification(); + } + + public static final int MAX_TIME_ELAPSED_SINCE_LAST_MODIFICATION_FIELD_NUMBER = 2; + private com.google.protobuf.Duration maxTimeElapsedSinceLastModification_; + /** + * + * + *
+     * If specified, only objects with a "last modification time" on or after
+     * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+     * have a "last modification time" are transferred.
+     * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+     * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+     * `NOW` refers to the [start_time]
+     * [google.storagetransfer.v1.TransferOperation.start_time] of the
+     * `TransferOperation`.
+     * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + * + * @return Whether the maxTimeElapsedSinceLastModification field is set. + */ + @java.lang.Override + public boolean hasMaxTimeElapsedSinceLastModification() { + return maxTimeElapsedSinceLastModification_ != null; + } + /** + * + * + *
+     * If specified, only objects with a "last modification time" on or after
+     * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+     * have a "last modification time" are transferred.
+     * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+     * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+     * `NOW` refers to the [start_time]
+     * [google.storagetransfer.v1.TransferOperation.start_time] of the
+     * `TransferOperation`.
+     * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + * + * @return The maxTimeElapsedSinceLastModification. + */ + @java.lang.Override + public com.google.protobuf.Duration getMaxTimeElapsedSinceLastModification() { + return maxTimeElapsedSinceLastModification_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxTimeElapsedSinceLastModification_; + } + /** + * + * + *
+     * If specified, only objects with a "last modification time" on or after
+     * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+     * have a "last modification time" are transferred.
+     * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+     * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+     * `NOW` refers to the [start_time]
+     * [google.storagetransfer.v1.TransferOperation.start_time] of the
+     * `TransferOperation`.
+     * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getMaxTimeElapsedSinceLastModificationOrBuilder() { + return getMaxTimeElapsedSinceLastModification(); + } + + public static final int INCLUDE_PREFIXES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList includePrefixes_; + /** + * + * + *
+     * If you specify `include_prefixes`, Storage Transfer Service uses the items
+     * in the `include_prefixes` array to determine which objects to include in a
+     * transfer. Objects must start with one of the matching `include_prefixes`
+     * for inclusion in the transfer. If [exclude_prefixes]
+     * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+     * objects must not start with any of the `exclude_prefixes` specified for
+     * inclusion in the transfer.
+     * The following are requirements of `include_prefixes`:
+     *   * Each include-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each include-prefix must omit the leading slash. For example, to
+     *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the include-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the include-prefix values can be empty, if specified.
+     *   * Each include-prefix must include a distinct portion of the object
+     *     namespace. No include-prefix may be a prefix of another
+     *     include-prefix.
+     * The max size of `include_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string include_prefixes = 3; + * + * @return A list containing the includePrefixes. + */ + public com.google.protobuf.ProtocolStringList getIncludePrefixesList() { + return includePrefixes_; + } + /** + * + * + *
+     * If you specify `include_prefixes`, Storage Transfer Service uses the items
+     * in the `include_prefixes` array to determine which objects to include in a
+     * transfer. Objects must start with one of the matching `include_prefixes`
+     * for inclusion in the transfer. If [exclude_prefixes]
+     * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+     * objects must not start with any of the `exclude_prefixes` specified for
+     * inclusion in the transfer.
+     * The following are requirements of `include_prefixes`:
+     *   * Each include-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each include-prefix must omit the leading slash. For example, to
+     *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the include-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the include-prefix values can be empty, if specified.
+     *   * Each include-prefix must include a distinct portion of the object
+     *     namespace. No include-prefix may be a prefix of another
+     *     include-prefix.
+     * The max size of `include_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string include_prefixes = 3; + * + * @return The count of includePrefixes. + */ + public int getIncludePrefixesCount() { + return includePrefixes_.size(); + } + /** + * + * + *
+     * If you specify `include_prefixes`, Storage Transfer Service uses the items
+     * in the `include_prefixes` array to determine which objects to include in a
+     * transfer. Objects must start with one of the matching `include_prefixes`
+     * for inclusion in the transfer. If [exclude_prefixes]
+     * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+     * objects must not start with any of the `exclude_prefixes` specified for
+     * inclusion in the transfer.
+     * The following are requirements of `include_prefixes`:
+     *   * Each include-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each include-prefix must omit the leading slash. For example, to
+     *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the include-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the include-prefix values can be empty, if specified.
+     *   * Each include-prefix must include a distinct portion of the object
+     *     namespace. No include-prefix may be a prefix of another
+     *     include-prefix.
+     * The max size of `include_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string include_prefixes = 3; + * + * @param index The index of the element to return. + * @return The includePrefixes at the given index. + */ + public java.lang.String getIncludePrefixes(int index) { + return includePrefixes_.get(index); + } + /** + * + * + *
+     * If you specify `include_prefixes`, Storage Transfer Service uses the items
+     * in the `include_prefixes` array to determine which objects to include in a
+     * transfer. Objects must start with one of the matching `include_prefixes`
+     * for inclusion in the transfer. If [exclude_prefixes]
+     * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+     * objects must not start with any of the `exclude_prefixes` specified for
+     * inclusion in the transfer.
+     * The following are requirements of `include_prefixes`:
+     *   * Each include-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each include-prefix must omit the leading slash. For example, to
+     *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the include-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the include-prefix values can be empty, if specified.
+     *   * Each include-prefix must include a distinct portion of the object
+     *     namespace. No include-prefix may be a prefix of another
+     *     include-prefix.
+     * The max size of `include_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string include_prefixes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the includePrefixes at the given index. + */ + public com.google.protobuf.ByteString getIncludePrefixesBytes(int index) { + return includePrefixes_.getByteString(index); + } + + public static final int EXCLUDE_PREFIXES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList excludePrefixes_; + /** + * + * + *
+     * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+     * in the `exclude_prefixes` array to determine which objects to exclude from
+     * a transfer. Objects must not start with one of the matching
+     * `exclude_prefixes` for inclusion in a transfer.
+     * The following are requirements of `exclude_prefixes`:
+     *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each exclude-prefix must omit the leading slash. For example, to
+     *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the exclude-prefix values can be empty, if specified.
+     *   * Each exclude-prefix must exclude a distinct portion of the object
+     *     namespace. No exclude-prefix may be a prefix of another
+     *     exclude-prefix.
+     *   * If [include_prefixes]
+     *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+     *     specified, then each exclude-prefix must start with the value of a path
+     *     explicitly included by `include_prefixes`.
+     * The max size of `exclude_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string exclude_prefixes = 4; + * + * @return A list containing the excludePrefixes. + */ + public com.google.protobuf.ProtocolStringList getExcludePrefixesList() { + return excludePrefixes_; + } + /** + * + * + *
+     * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+     * in the `exclude_prefixes` array to determine which objects to exclude from
+     * a transfer. Objects must not start with one of the matching
+     * `exclude_prefixes` for inclusion in a transfer.
+     * The following are requirements of `exclude_prefixes`:
+     *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each exclude-prefix must omit the leading slash. For example, to
+     *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the exclude-prefix values can be empty, if specified.
+     *   * Each exclude-prefix must exclude a distinct portion of the object
+     *     namespace. No exclude-prefix may be a prefix of another
+     *     exclude-prefix.
+     *   * If [include_prefixes]
+     *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+     *     specified, then each exclude-prefix must start with the value of a path
+     *     explicitly included by `include_prefixes`.
+     * The max size of `exclude_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string exclude_prefixes = 4; + * + * @return The count of excludePrefixes. + */ + public int getExcludePrefixesCount() { + return excludePrefixes_.size(); + } + /** + * + * + *
+     * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+     * in the `exclude_prefixes` array to determine which objects to exclude from
+     * a transfer. Objects must not start with one of the matching
+     * `exclude_prefixes` for inclusion in a transfer.
+     * The following are requirements of `exclude_prefixes`:
+     *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each exclude-prefix must omit the leading slash. For example, to
+     *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the exclude-prefix values can be empty, if specified.
+     *   * Each exclude-prefix must exclude a distinct portion of the object
+     *     namespace. No exclude-prefix may be a prefix of another
+     *     exclude-prefix.
+     *   * If [include_prefixes]
+     *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+     *     specified, then each exclude-prefix must start with the value of a path
+     *     explicitly included by `include_prefixes`.
+     * The max size of `exclude_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string exclude_prefixes = 4; + * + * @param index The index of the element to return. + * @return The excludePrefixes at the given index. + */ + public java.lang.String getExcludePrefixes(int index) { + return excludePrefixes_.get(index); + } + /** + * + * + *
+     * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+     * in the `exclude_prefixes` array to determine which objects to exclude from
+     * a transfer. Objects must not start with one of the matching
+     * `exclude_prefixes` for inclusion in a transfer.
+     * The following are requirements of `exclude_prefixes`:
+     *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+     *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+     *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+     *     expression matching are not supported.
+     *   * Each exclude-prefix must omit the leading slash. For example, to
+     *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+     *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+     *   * None of the exclude-prefix values can be empty, if specified.
+     *   * Each exclude-prefix must exclude a distinct portion of the object
+     *     namespace. No exclude-prefix may be a prefix of another
+     *     exclude-prefix.
+     *   * If [include_prefixes]
+     *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+     *     specified, then each exclude-prefix must start with the value of a path
+     *     explicitly included by `include_prefixes`.
+     * The max size of `exclude_prefixes` is 1000.
+     * For more information, see [Filtering objects from
+     * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+     * 
+ * + * repeated string exclude_prefixes = 4; + * + * @param index The index of the value to return. + * @return The bytes of the excludePrefixes at the given index. + */ + public com.google.protobuf.ByteString getExcludePrefixesBytes(int index) { + return excludePrefixes_.getByteString(index); + } + + public static final int LAST_MODIFIED_SINCE_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp lastModifiedSince_; + /** + * + * + *
+     * If specified, only objects with a "last modification time" on or after
+     * this timestamp and objects that don't have a "last modification time" are
+     * transferred.
+     * The `last_modified_since` and `last_modified_before` fields can be used
+     * together for chunked data processing. For example, consider a script that
+     * processes each day's worth of data at a time. For that you'd set each
+     * of the fields as follows:
+     * *  `last_modified_since` to the start of the day
+     * *  `last_modified_before` to the end of the day
+     * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + * + * @return Whether the lastModifiedSince field is set. + */ + @java.lang.Override + public boolean hasLastModifiedSince() { + return lastModifiedSince_ != null; + } + /** + * + * + *
+     * If specified, only objects with a "last modification time" on or after
+     * this timestamp and objects that don't have a "last modification time" are
+     * transferred.
+     * The `last_modified_since` and `last_modified_before` fields can be used
+     * together for chunked data processing. For example, consider a script that
+     * processes each day's worth of data at a time. For that you'd set each
+     * of the fields as follows:
+     * *  `last_modified_since` to the start of the day
+     * *  `last_modified_before` to the end of the day
+     * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + * + * @return The lastModifiedSince. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastModifiedSince() { + return lastModifiedSince_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastModifiedSince_; + } + /** + * + * + *
+     * If specified, only objects with a "last modification time" on or after
+     * this timestamp and objects that don't have a "last modification time" are
+     * transferred.
+     * The `last_modified_since` and `last_modified_before` fields can be used
+     * together for chunked data processing. For example, consider a script that
+     * processes each day's worth of data at a time. For that you'd set each
+     * of the fields as follows:
+     * *  `last_modified_since` to the start of the day
+     * *  `last_modified_before` to the end of the day
+     * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastModifiedSinceOrBuilder() { + return getLastModifiedSince(); + } + + public static final int LAST_MODIFIED_BEFORE_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp lastModifiedBefore_; + /** + * + * + *
+     * If specified, only objects with a "last modification time" before this
+     * timestamp and objects that don't have a "last modification time" will be
+     * transferred.
+     * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + * + * @return Whether the lastModifiedBefore field is set. + */ + @java.lang.Override + public boolean hasLastModifiedBefore() { + return lastModifiedBefore_ != null; + } + /** + * + * + *
+     * If specified, only objects with a "last modification time" before this
+     * timestamp and objects that don't have a "last modification time" will be
+     * transferred.
+     * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + * + * @return The lastModifiedBefore. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastModifiedBefore() { + return lastModifiedBefore_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastModifiedBefore_; + } + /** + * + * + *
+     * If specified, only objects with a "last modification time" before this
+     * timestamp and objects that don't have a "last modification time" will be
+     * transferred.
+     * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastModifiedBeforeOrBuilder() { + return getLastModifiedBefore(); + } + + 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 (minTimeElapsedSinceLastModification_ != null) { + output.writeMessage(1, getMinTimeElapsedSinceLastModification()); + } + if (maxTimeElapsedSinceLastModification_ != null) { + output.writeMessage(2, getMaxTimeElapsedSinceLastModification()); + } + for (int i = 0; i < includePrefixes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, includePrefixes_.getRaw(i)); + } + for (int i = 0; i < excludePrefixes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, excludePrefixes_.getRaw(i)); + } + if (lastModifiedSince_ != null) { + output.writeMessage(5, getLastModifiedSince()); + } + if (lastModifiedBefore_ != null) { + output.writeMessage(6, getLastModifiedBefore()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minTimeElapsedSinceLastModification_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, getMinTimeElapsedSinceLastModification()); + } + if (maxTimeElapsedSinceLastModification_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, getMaxTimeElapsedSinceLastModification()); + } + { + int dataSize = 0; + for (int i = 0; i < includePrefixes_.size(); i++) { + dataSize += computeStringSizeNoTag(includePrefixes_.getRaw(i)); + } + size += dataSize; + size += 1 * getIncludePrefixesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < excludePrefixes_.size(); i++) { + dataSize += computeStringSizeNoTag(excludePrefixes_.getRaw(i)); + } + size += dataSize; + size += 1 * getExcludePrefixesList().size(); + } + if (lastModifiedSince_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getLastModifiedSince()); + } + if (lastModifiedBefore_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getLastModifiedBefore()); + } + 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.storagetransfer.v1.proto.TransferTypes.ObjectConditions)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions other = + (com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions) obj; + + if (hasMinTimeElapsedSinceLastModification() + != other.hasMinTimeElapsedSinceLastModification()) return false; + if (hasMinTimeElapsedSinceLastModification()) { + if (!getMinTimeElapsedSinceLastModification() + .equals(other.getMinTimeElapsedSinceLastModification())) return false; + } + if (hasMaxTimeElapsedSinceLastModification() + != other.hasMaxTimeElapsedSinceLastModification()) return false; + if (hasMaxTimeElapsedSinceLastModification()) { + if (!getMaxTimeElapsedSinceLastModification() + .equals(other.getMaxTimeElapsedSinceLastModification())) return false; + } + if (!getIncludePrefixesList().equals(other.getIncludePrefixesList())) return false; + if (!getExcludePrefixesList().equals(other.getExcludePrefixesList())) return false; + if (hasLastModifiedSince() != other.hasLastModifiedSince()) return false; + if (hasLastModifiedSince()) { + if (!getLastModifiedSince().equals(other.getLastModifiedSince())) return false; + } + if (hasLastModifiedBefore() != other.hasLastModifiedBefore()) return false; + if (hasLastModifiedBefore()) { + if (!getLastModifiedBefore().equals(other.getLastModifiedBefore())) 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 (hasMinTimeElapsedSinceLastModification()) { + hash = (37 * hash) + MIN_TIME_ELAPSED_SINCE_LAST_MODIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getMinTimeElapsedSinceLastModification().hashCode(); + } + if (hasMaxTimeElapsedSinceLastModification()) { + hash = (37 * hash) + MAX_TIME_ELAPSED_SINCE_LAST_MODIFICATION_FIELD_NUMBER; + hash = (53 * hash) + getMaxTimeElapsedSinceLastModification().hashCode(); + } + if (getIncludePrefixesCount() > 0) { + hash = (37 * hash) + INCLUDE_PREFIXES_FIELD_NUMBER; + hash = (53 * hash) + getIncludePrefixesList().hashCode(); + } + if (getExcludePrefixesCount() > 0) { + hash = (37 * hash) + EXCLUDE_PREFIXES_FIELD_NUMBER; + hash = (53 * hash) + getExcludePrefixesList().hashCode(); + } + if (hasLastModifiedSince()) { + hash = (37 * hash) + LAST_MODIFIED_SINCE_FIELD_NUMBER; + hash = (53 * hash) + getLastModifiedSince().hashCode(); + } + if (hasLastModifiedBefore()) { + hash = (37 * hash) + LAST_MODIFIED_BEFORE_FIELD_NUMBER; + hash = (53 * hash) + getLastModifiedBefore().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions 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.storagetransfer.v1.proto.TransferTypes.ObjectConditions parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions 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.storagetransfer.v1.proto.TransferTypes.ObjectConditions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions + 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.storagetransfer.v1.proto.TransferTypes.ObjectConditions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions 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.storagetransfer.v1.proto.TransferTypes.ObjectConditions 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; + } + /** + * + * + *
+     * Conditions that determine which objects will be transferred. Applies only
+     * to Cloud Data Sources such as S3, Azure, and Cloud Storage.
+     * The "last modification time" refers to the time of the
+     * last change to the object's content or metadata — specifically, this is
+     * the `updated` property of Cloud Storage objects, the `LastModified` field
+     * of S3 objects, and the `Last-Modified` header of Azure blobs.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.ObjectConditions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.ObjectConditions) + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ObjectConditions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ObjectConditions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.class, + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.Builder.class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.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 (minTimeElapsedSinceLastModificationBuilder_ == null) { + minTimeElapsedSinceLastModification_ = null; + } else { + minTimeElapsedSinceLastModification_ = null; + minTimeElapsedSinceLastModificationBuilder_ = null; + } + if (maxTimeElapsedSinceLastModificationBuilder_ == null) { + maxTimeElapsedSinceLastModification_ = null; + } else { + maxTimeElapsedSinceLastModification_ = null; + maxTimeElapsedSinceLastModificationBuilder_ = null; + } + includePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + excludePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + if (lastModifiedSinceBuilder_ == null) { + lastModifiedSince_ = null; + } else { + lastModifiedSince_ = null; + lastModifiedSinceBuilder_ = null; + } + if (lastModifiedBeforeBuilder_ == null) { + lastModifiedBefore_ = null; + } else { + lastModifiedBefore_ = null; + lastModifiedBeforeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ObjectConditions_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions build() { + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions result = + new com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions(this); + int from_bitField0_ = bitField0_; + if (minTimeElapsedSinceLastModificationBuilder_ == null) { + result.minTimeElapsedSinceLastModification_ = minTimeElapsedSinceLastModification_; + } else { + result.minTimeElapsedSinceLastModification_ = + minTimeElapsedSinceLastModificationBuilder_.build(); + } + if (maxTimeElapsedSinceLastModificationBuilder_ == null) { + result.maxTimeElapsedSinceLastModification_ = maxTimeElapsedSinceLastModification_; + } else { + result.maxTimeElapsedSinceLastModification_ = + maxTimeElapsedSinceLastModificationBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + includePrefixes_ = includePrefixes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.includePrefixes_ = includePrefixes_; + if (((bitField0_ & 0x00000002) != 0)) { + excludePrefixes_ = excludePrefixes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.excludePrefixes_ = excludePrefixes_; + if (lastModifiedSinceBuilder_ == null) { + result.lastModifiedSince_ = lastModifiedSince_; + } else { + result.lastModifiedSince_ = lastModifiedSinceBuilder_.build(); + } + if (lastModifiedBeforeBuilder_ == null) { + result.lastModifiedBefore_ = lastModifiedBefore_; + } else { + result.lastModifiedBefore_ = lastModifiedBeforeBuilder_.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.storagetransfer.v1.proto.TransferTypes.ObjectConditions) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions + .getDefaultInstance()) return this; + if (other.hasMinTimeElapsedSinceLastModification()) { + mergeMinTimeElapsedSinceLastModification(other.getMinTimeElapsedSinceLastModification()); + } + if (other.hasMaxTimeElapsedSinceLastModification()) { + mergeMaxTimeElapsedSinceLastModification(other.getMaxTimeElapsedSinceLastModification()); + } + if (!other.includePrefixes_.isEmpty()) { + if (includePrefixes_.isEmpty()) { + includePrefixes_ = other.includePrefixes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIncludePrefixesIsMutable(); + includePrefixes_.addAll(other.includePrefixes_); + } + onChanged(); + } + if (!other.excludePrefixes_.isEmpty()) { + if (excludePrefixes_.isEmpty()) { + excludePrefixes_ = other.excludePrefixes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureExcludePrefixesIsMutable(); + excludePrefixes_.addAll(other.excludePrefixes_); + } + onChanged(); + } + if (other.hasLastModifiedSince()) { + mergeLastModifiedSince(other.getLastModifiedSince()); + } + if (other.hasLastModifiedBefore()) { + mergeLastModifiedBefore(other.getLastModifiedBefore()); + } + 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.storagetransfer.v1.proto.TransferTypes.ObjectConditions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Duration minTimeElapsedSinceLastModification_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + minTimeElapsedSinceLastModificationBuilder_; + /** + * + * + *
+       * If specified, only objects with a "last modification time" before
+       * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+       *  have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+       * refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + * + * @return Whether the minTimeElapsedSinceLastModification field is set. + */ + public boolean hasMinTimeElapsedSinceLastModification() { + return minTimeElapsedSinceLastModificationBuilder_ != null + || minTimeElapsedSinceLastModification_ != null; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before
+       * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+       *  have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+       * refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + * + * @return The minTimeElapsedSinceLastModification. + */ + public com.google.protobuf.Duration getMinTimeElapsedSinceLastModification() { + if (minTimeElapsedSinceLastModificationBuilder_ == null) { + return minTimeElapsedSinceLastModification_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minTimeElapsedSinceLastModification_; + } else { + return minTimeElapsedSinceLastModificationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before
+       * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+       *  have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+       * refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + */ + public Builder setMinTimeElapsedSinceLastModification(com.google.protobuf.Duration value) { + if (minTimeElapsedSinceLastModificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minTimeElapsedSinceLastModification_ = value; + onChanged(); + } else { + minTimeElapsedSinceLastModificationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before
+       * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+       *  have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+       * refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + */ + public Builder setMinTimeElapsedSinceLastModification( + com.google.protobuf.Duration.Builder builderForValue) { + if (minTimeElapsedSinceLastModificationBuilder_ == null) { + minTimeElapsedSinceLastModification_ = builderForValue.build(); + onChanged(); + } else { + minTimeElapsedSinceLastModificationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before
+       * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+       *  have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+       * refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + */ + public Builder mergeMinTimeElapsedSinceLastModification(com.google.protobuf.Duration value) { + if (minTimeElapsedSinceLastModificationBuilder_ == null) { + if (minTimeElapsedSinceLastModification_ != null) { + minTimeElapsedSinceLastModification_ = + com.google.protobuf.Duration.newBuilder(minTimeElapsedSinceLastModification_) + .mergeFrom(value) + .buildPartial(); + } else { + minTimeElapsedSinceLastModification_ = value; + } + onChanged(); + } else { + minTimeElapsedSinceLastModificationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before
+       * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+       *  have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+       * refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + */ + public Builder clearMinTimeElapsedSinceLastModification() { + if (minTimeElapsedSinceLastModificationBuilder_ == null) { + minTimeElapsedSinceLastModification_ = null; + onChanged(); + } else { + minTimeElapsedSinceLastModification_ = null; + minTimeElapsedSinceLastModificationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before
+       * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+       *  have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+       * refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + */ + public com.google.protobuf.Duration.Builder getMinTimeElapsedSinceLastModificationBuilder() { + + onChanged(); + return getMinTimeElapsedSinceLastModificationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before
+       * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+       *  have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+       * refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + */ + public com.google.protobuf.DurationOrBuilder + getMinTimeElapsedSinceLastModificationOrBuilder() { + if (minTimeElapsedSinceLastModificationBuilder_ != null) { + return minTimeElapsedSinceLastModificationBuilder_.getMessageOrBuilder(); + } else { + return minTimeElapsedSinceLastModification_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : minTimeElapsedSinceLastModification_; + } + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before
+       * `NOW` - `min_time_elapsed_since_last_modification` and objects that don't
+       *  have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW`
+       * refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMinTimeElapsedSinceLastModificationFieldBuilder() { + if (minTimeElapsedSinceLastModificationBuilder_ == null) { + minTimeElapsedSinceLastModificationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMinTimeElapsedSinceLastModification(), getParentForChildren(), isClean()); + minTimeElapsedSinceLastModification_ = null; + } + return minTimeElapsedSinceLastModificationBuilder_; + } + + private com.google.protobuf.Duration maxTimeElapsedSinceLastModification_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + maxTimeElapsedSinceLastModificationBuilder_; + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+       * have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+       * `NOW` refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + * + * @return Whether the maxTimeElapsedSinceLastModification field is set. + */ + public boolean hasMaxTimeElapsedSinceLastModification() { + return maxTimeElapsedSinceLastModificationBuilder_ != null + || maxTimeElapsedSinceLastModification_ != null; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+       * have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+       * `NOW` refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + * + * @return The maxTimeElapsedSinceLastModification. + */ + public com.google.protobuf.Duration getMaxTimeElapsedSinceLastModification() { + if (maxTimeElapsedSinceLastModificationBuilder_ == null) { + return maxTimeElapsedSinceLastModification_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxTimeElapsedSinceLastModification_; + } else { + return maxTimeElapsedSinceLastModificationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+       * have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+       * `NOW` refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + */ + public Builder setMaxTimeElapsedSinceLastModification(com.google.protobuf.Duration value) { + if (maxTimeElapsedSinceLastModificationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxTimeElapsedSinceLastModification_ = value; + onChanged(); + } else { + maxTimeElapsedSinceLastModificationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+       * have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+       * `NOW` refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + */ + public Builder setMaxTimeElapsedSinceLastModification( + com.google.protobuf.Duration.Builder builderForValue) { + if (maxTimeElapsedSinceLastModificationBuilder_ == null) { + maxTimeElapsedSinceLastModification_ = builderForValue.build(); + onChanged(); + } else { + maxTimeElapsedSinceLastModificationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+       * have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+       * `NOW` refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + */ + public Builder mergeMaxTimeElapsedSinceLastModification(com.google.protobuf.Duration value) { + if (maxTimeElapsedSinceLastModificationBuilder_ == null) { + if (maxTimeElapsedSinceLastModification_ != null) { + maxTimeElapsedSinceLastModification_ = + com.google.protobuf.Duration.newBuilder(maxTimeElapsedSinceLastModification_) + .mergeFrom(value) + .buildPartial(); + } else { + maxTimeElapsedSinceLastModification_ = value; + } + onChanged(); + } else { + maxTimeElapsedSinceLastModificationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+       * have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+       * `NOW` refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + */ + public Builder clearMaxTimeElapsedSinceLastModification() { + if (maxTimeElapsedSinceLastModificationBuilder_ == null) { + maxTimeElapsedSinceLastModification_ = null; + onChanged(); + } else { + maxTimeElapsedSinceLastModification_ = null; + maxTimeElapsedSinceLastModificationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+       * have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+       * `NOW` refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + */ + public com.google.protobuf.Duration.Builder getMaxTimeElapsedSinceLastModificationBuilder() { + + onChanged(); + return getMaxTimeElapsedSinceLastModificationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+       * have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+       * `NOW` refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + */ + public com.google.protobuf.DurationOrBuilder + getMaxTimeElapsedSinceLastModificationOrBuilder() { + if (maxTimeElapsedSinceLastModificationBuilder_ != null) { + return maxTimeElapsedSinceLastModificationBuilder_.getMessageOrBuilder(); + } else { + return maxTimeElapsedSinceLastModification_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : maxTimeElapsedSinceLastModification_; + } + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * `NOW` - `max_time_elapsed_since_last_modification` and objects that don't
+       * have a "last modification time" are transferred.
+       * For each [TransferOperation][google.storagetransfer.v1.TransferOperation]
+       * started by this [TransferJob][google.storagetransfer.v1.TransferJob],
+       * `NOW` refers to the [start_time]
+       * [google.storagetransfer.v1.TransferOperation.start_time] of the
+       * `TransferOperation`.
+       * 
+ * + * .google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getMaxTimeElapsedSinceLastModificationFieldBuilder() { + if (maxTimeElapsedSinceLastModificationBuilder_ == null) { + maxTimeElapsedSinceLastModificationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getMaxTimeElapsedSinceLastModification(), getParentForChildren(), isClean()); + maxTimeElapsedSinceLastModification_ = null; + } + return maxTimeElapsedSinceLastModificationBuilder_; + } + + private com.google.protobuf.LazyStringList includePrefixes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureIncludePrefixesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + includePrefixes_ = new com.google.protobuf.LazyStringArrayList(includePrefixes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * If you specify `include_prefixes`, Storage Transfer Service uses the items
+       * in the `include_prefixes` array to determine which objects to include in a
+       * transfer. Objects must start with one of the matching `include_prefixes`
+       * for inclusion in the transfer. If [exclude_prefixes]
+       * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+       * objects must not start with any of the `exclude_prefixes` specified for
+       * inclusion in the transfer.
+       * The following are requirements of `include_prefixes`:
+       *   * Each include-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each include-prefix must omit the leading slash. For example, to
+       *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the include-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the include-prefix values can be empty, if specified.
+       *   * Each include-prefix must include a distinct portion of the object
+       *     namespace. No include-prefix may be a prefix of another
+       *     include-prefix.
+       * The max size of `include_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string include_prefixes = 3; + * + * @return A list containing the includePrefixes. + */ + public com.google.protobuf.ProtocolStringList getIncludePrefixesList() { + return includePrefixes_.getUnmodifiableView(); + } + /** + * + * + *
+       * If you specify `include_prefixes`, Storage Transfer Service uses the items
+       * in the `include_prefixes` array to determine which objects to include in a
+       * transfer. Objects must start with one of the matching `include_prefixes`
+       * for inclusion in the transfer. If [exclude_prefixes]
+       * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+       * objects must not start with any of the `exclude_prefixes` specified for
+       * inclusion in the transfer.
+       * The following are requirements of `include_prefixes`:
+       *   * Each include-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each include-prefix must omit the leading slash. For example, to
+       *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the include-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the include-prefix values can be empty, if specified.
+       *   * Each include-prefix must include a distinct portion of the object
+       *     namespace. No include-prefix may be a prefix of another
+       *     include-prefix.
+       * The max size of `include_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string include_prefixes = 3; + * + * @return The count of includePrefixes. + */ + public int getIncludePrefixesCount() { + return includePrefixes_.size(); + } + /** + * + * + *
+       * If you specify `include_prefixes`, Storage Transfer Service uses the items
+       * in the `include_prefixes` array to determine which objects to include in a
+       * transfer. Objects must start with one of the matching `include_prefixes`
+       * for inclusion in the transfer. If [exclude_prefixes]
+       * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+       * objects must not start with any of the `exclude_prefixes` specified for
+       * inclusion in the transfer.
+       * The following are requirements of `include_prefixes`:
+       *   * Each include-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each include-prefix must omit the leading slash. For example, to
+       *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the include-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the include-prefix values can be empty, if specified.
+       *   * Each include-prefix must include a distinct portion of the object
+       *     namespace. No include-prefix may be a prefix of another
+       *     include-prefix.
+       * The max size of `include_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string include_prefixes = 3; + * + * @param index The index of the element to return. + * @return The includePrefixes at the given index. + */ + public java.lang.String getIncludePrefixes(int index) { + return includePrefixes_.get(index); + } + /** + * + * + *
+       * If you specify `include_prefixes`, Storage Transfer Service uses the items
+       * in the `include_prefixes` array to determine which objects to include in a
+       * transfer. Objects must start with one of the matching `include_prefixes`
+       * for inclusion in the transfer. If [exclude_prefixes]
+       * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+       * objects must not start with any of the `exclude_prefixes` specified for
+       * inclusion in the transfer.
+       * The following are requirements of `include_prefixes`:
+       *   * Each include-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each include-prefix must omit the leading slash. For example, to
+       *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the include-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the include-prefix values can be empty, if specified.
+       *   * Each include-prefix must include a distinct portion of the object
+       *     namespace. No include-prefix may be a prefix of another
+       *     include-prefix.
+       * The max size of `include_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string include_prefixes = 3; + * + * @param index The index of the value to return. + * @return The bytes of the includePrefixes at the given index. + */ + public com.google.protobuf.ByteString getIncludePrefixesBytes(int index) { + return includePrefixes_.getByteString(index); + } + /** + * + * + *
+       * If you specify `include_prefixes`, Storage Transfer Service uses the items
+       * in the `include_prefixes` array to determine which objects to include in a
+       * transfer. Objects must start with one of the matching `include_prefixes`
+       * for inclusion in the transfer. If [exclude_prefixes]
+       * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+       * objects must not start with any of the `exclude_prefixes` specified for
+       * inclusion in the transfer.
+       * The following are requirements of `include_prefixes`:
+       *   * Each include-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each include-prefix must omit the leading slash. For example, to
+       *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the include-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the include-prefix values can be empty, if specified.
+       *   * Each include-prefix must include a distinct portion of the object
+       *     namespace. No include-prefix may be a prefix of another
+       *     include-prefix.
+       * The max size of `include_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string include_prefixes = 3; + * + * @param index The index to set the value at. + * @param value The includePrefixes to set. + * @return This builder for chaining. + */ + public Builder setIncludePrefixes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludePrefixesIsMutable(); + includePrefixes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * If you specify `include_prefixes`, Storage Transfer Service uses the items
+       * in the `include_prefixes` array to determine which objects to include in a
+       * transfer. Objects must start with one of the matching `include_prefixes`
+       * for inclusion in the transfer. If [exclude_prefixes]
+       * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+       * objects must not start with any of the `exclude_prefixes` specified for
+       * inclusion in the transfer.
+       * The following are requirements of `include_prefixes`:
+       *   * Each include-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each include-prefix must omit the leading slash. For example, to
+       *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the include-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the include-prefix values can be empty, if specified.
+       *   * Each include-prefix must include a distinct portion of the object
+       *     namespace. No include-prefix may be a prefix of another
+       *     include-prefix.
+       * The max size of `include_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string include_prefixes = 3; + * + * @param value The includePrefixes to add. + * @return This builder for chaining. + */ + public Builder addIncludePrefixes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIncludePrefixesIsMutable(); + includePrefixes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * If you specify `include_prefixes`, Storage Transfer Service uses the items
+       * in the `include_prefixes` array to determine which objects to include in a
+       * transfer. Objects must start with one of the matching `include_prefixes`
+       * for inclusion in the transfer. If [exclude_prefixes]
+       * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+       * objects must not start with any of the `exclude_prefixes` specified for
+       * inclusion in the transfer.
+       * The following are requirements of `include_prefixes`:
+       *   * Each include-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each include-prefix must omit the leading slash. For example, to
+       *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the include-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the include-prefix values can be empty, if specified.
+       *   * Each include-prefix must include a distinct portion of the object
+       *     namespace. No include-prefix may be a prefix of another
+       *     include-prefix.
+       * The max size of `include_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string include_prefixes = 3; + * + * @param values The includePrefixes to add. + * @return This builder for chaining. + */ + public Builder addAllIncludePrefixes(java.lang.Iterable values) { + ensureIncludePrefixesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, includePrefixes_); + onChanged(); + return this; + } + /** + * + * + *
+       * If you specify `include_prefixes`, Storage Transfer Service uses the items
+       * in the `include_prefixes` array to determine which objects to include in a
+       * transfer. Objects must start with one of the matching `include_prefixes`
+       * for inclusion in the transfer. If [exclude_prefixes]
+       * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+       * objects must not start with any of the `exclude_prefixes` specified for
+       * inclusion in the transfer.
+       * The following are requirements of `include_prefixes`:
+       *   * Each include-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each include-prefix must omit the leading slash. For example, to
+       *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the include-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the include-prefix values can be empty, if specified.
+       *   * Each include-prefix must include a distinct portion of the object
+       *     namespace. No include-prefix may be a prefix of another
+       *     include-prefix.
+       * The max size of `include_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string include_prefixes = 3; + * + * @return This builder for chaining. + */ + public Builder clearIncludePrefixes() { + includePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * If you specify `include_prefixes`, Storage Transfer Service uses the items
+       * in the `include_prefixes` array to determine which objects to include in a
+       * transfer. Objects must start with one of the matching `include_prefixes`
+       * for inclusion in the transfer. If [exclude_prefixes]
+       * [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified,
+       * objects must not start with any of the `exclude_prefixes` specified for
+       * inclusion in the transfer.
+       * The following are requirements of `include_prefixes`:
+       *   * Each include-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each include-prefix must omit the leading slash. For example, to
+       *     include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the include-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the include-prefix values can be empty, if specified.
+       *   * Each include-prefix must include a distinct portion of the object
+       *     namespace. No include-prefix may be a prefix of another
+       *     include-prefix.
+       * The max size of `include_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string include_prefixes = 3; + * + * @param value The bytes of the includePrefixes to add. + * @return This builder for chaining. + */ + public Builder addIncludePrefixesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIncludePrefixesIsMutable(); + includePrefixes_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList excludePrefixes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureExcludePrefixesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + excludePrefixes_ = new com.google.protobuf.LazyStringArrayList(excludePrefixes_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+       * in the `exclude_prefixes` array to determine which objects to exclude from
+       * a transfer. Objects must not start with one of the matching
+       * `exclude_prefixes` for inclusion in a transfer.
+       * The following are requirements of `exclude_prefixes`:
+       *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each exclude-prefix must omit the leading slash. For example, to
+       *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the exclude-prefix values can be empty, if specified.
+       *   * Each exclude-prefix must exclude a distinct portion of the object
+       *     namespace. No exclude-prefix may be a prefix of another
+       *     exclude-prefix.
+       *   * If [include_prefixes]
+       *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+       *     specified, then each exclude-prefix must start with the value of a path
+       *     explicitly included by `include_prefixes`.
+       * The max size of `exclude_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string exclude_prefixes = 4; + * + * @return A list containing the excludePrefixes. + */ + public com.google.protobuf.ProtocolStringList getExcludePrefixesList() { + return excludePrefixes_.getUnmodifiableView(); + } + /** + * + * + *
+       * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+       * in the `exclude_prefixes` array to determine which objects to exclude from
+       * a transfer. Objects must not start with one of the matching
+       * `exclude_prefixes` for inclusion in a transfer.
+       * The following are requirements of `exclude_prefixes`:
+       *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each exclude-prefix must omit the leading slash. For example, to
+       *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the exclude-prefix values can be empty, if specified.
+       *   * Each exclude-prefix must exclude a distinct portion of the object
+       *     namespace. No exclude-prefix may be a prefix of another
+       *     exclude-prefix.
+       *   * If [include_prefixes]
+       *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+       *     specified, then each exclude-prefix must start with the value of a path
+       *     explicitly included by `include_prefixes`.
+       * The max size of `exclude_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string exclude_prefixes = 4; + * + * @return The count of excludePrefixes. + */ + public int getExcludePrefixesCount() { + return excludePrefixes_.size(); + } + /** + * + * + *
+       * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+       * in the `exclude_prefixes` array to determine which objects to exclude from
+       * a transfer. Objects must not start with one of the matching
+       * `exclude_prefixes` for inclusion in a transfer.
+       * The following are requirements of `exclude_prefixes`:
+       *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each exclude-prefix must omit the leading slash. For example, to
+       *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the exclude-prefix values can be empty, if specified.
+       *   * Each exclude-prefix must exclude a distinct portion of the object
+       *     namespace. No exclude-prefix may be a prefix of another
+       *     exclude-prefix.
+       *   * If [include_prefixes]
+       *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+       *     specified, then each exclude-prefix must start with the value of a path
+       *     explicitly included by `include_prefixes`.
+       * The max size of `exclude_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string exclude_prefixes = 4; + * + * @param index The index of the element to return. + * @return The excludePrefixes at the given index. + */ + public java.lang.String getExcludePrefixes(int index) { + return excludePrefixes_.get(index); + } + /** + * + * + *
+       * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+       * in the `exclude_prefixes` array to determine which objects to exclude from
+       * a transfer. Objects must not start with one of the matching
+       * `exclude_prefixes` for inclusion in a transfer.
+       * The following are requirements of `exclude_prefixes`:
+       *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each exclude-prefix must omit the leading slash. For example, to
+       *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the exclude-prefix values can be empty, if specified.
+       *   * Each exclude-prefix must exclude a distinct portion of the object
+       *     namespace. No exclude-prefix may be a prefix of another
+       *     exclude-prefix.
+       *   * If [include_prefixes]
+       *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+       *     specified, then each exclude-prefix must start with the value of a path
+       *     explicitly included by `include_prefixes`.
+       * The max size of `exclude_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string exclude_prefixes = 4; + * + * @param index The index of the value to return. + * @return The bytes of the excludePrefixes at the given index. + */ + public com.google.protobuf.ByteString getExcludePrefixesBytes(int index) { + return excludePrefixes_.getByteString(index); + } + /** + * + * + *
+       * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+       * in the `exclude_prefixes` array to determine which objects to exclude from
+       * a transfer. Objects must not start with one of the matching
+       * `exclude_prefixes` for inclusion in a transfer.
+       * The following are requirements of `exclude_prefixes`:
+       *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each exclude-prefix must omit the leading slash. For example, to
+       *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the exclude-prefix values can be empty, if specified.
+       *   * Each exclude-prefix must exclude a distinct portion of the object
+       *     namespace. No exclude-prefix may be a prefix of another
+       *     exclude-prefix.
+       *   * If [include_prefixes]
+       *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+       *     specified, then each exclude-prefix must start with the value of a path
+       *     explicitly included by `include_prefixes`.
+       * The max size of `exclude_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string exclude_prefixes = 4; + * + * @param index The index to set the value at. + * @param value The excludePrefixes to set. + * @return This builder for chaining. + */ + public Builder setExcludePrefixes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludePrefixesIsMutable(); + excludePrefixes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+       * in the `exclude_prefixes` array to determine which objects to exclude from
+       * a transfer. Objects must not start with one of the matching
+       * `exclude_prefixes` for inclusion in a transfer.
+       * The following are requirements of `exclude_prefixes`:
+       *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each exclude-prefix must omit the leading slash. For example, to
+       *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the exclude-prefix values can be empty, if specified.
+       *   * Each exclude-prefix must exclude a distinct portion of the object
+       *     namespace. No exclude-prefix may be a prefix of another
+       *     exclude-prefix.
+       *   * If [include_prefixes]
+       *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+       *     specified, then each exclude-prefix must start with the value of a path
+       *     explicitly included by `include_prefixes`.
+       * The max size of `exclude_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string exclude_prefixes = 4; + * + * @param value The excludePrefixes to add. + * @return This builder for chaining. + */ + public Builder addExcludePrefixes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureExcludePrefixesIsMutable(); + excludePrefixes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+       * in the `exclude_prefixes` array to determine which objects to exclude from
+       * a transfer. Objects must not start with one of the matching
+       * `exclude_prefixes` for inclusion in a transfer.
+       * The following are requirements of `exclude_prefixes`:
+       *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each exclude-prefix must omit the leading slash. For example, to
+       *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the exclude-prefix values can be empty, if specified.
+       *   * Each exclude-prefix must exclude a distinct portion of the object
+       *     namespace. No exclude-prefix may be a prefix of another
+       *     exclude-prefix.
+       *   * If [include_prefixes]
+       *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+       *     specified, then each exclude-prefix must start with the value of a path
+       *     explicitly included by `include_prefixes`.
+       * The max size of `exclude_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string exclude_prefixes = 4; + * + * @param values The excludePrefixes to add. + * @return This builder for chaining. + */ + public Builder addAllExcludePrefixes(java.lang.Iterable values) { + ensureExcludePrefixesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, excludePrefixes_); + onChanged(); + return this; + } + /** + * + * + *
+       * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+       * in the `exclude_prefixes` array to determine which objects to exclude from
+       * a transfer. Objects must not start with one of the matching
+       * `exclude_prefixes` for inclusion in a transfer.
+       * The following are requirements of `exclude_prefixes`:
+       *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each exclude-prefix must omit the leading slash. For example, to
+       *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the exclude-prefix values can be empty, if specified.
+       *   * Each exclude-prefix must exclude a distinct portion of the object
+       *     namespace. No exclude-prefix may be a prefix of another
+       *     exclude-prefix.
+       *   * If [include_prefixes]
+       *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+       *     specified, then each exclude-prefix must start with the value of a path
+       *     explicitly included by `include_prefixes`.
+       * The max size of `exclude_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string exclude_prefixes = 4; + * + * @return This builder for chaining. + */ + public Builder clearExcludePrefixes() { + excludePrefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * If you specify `exclude_prefixes`, Storage Transfer Service uses the items
+       * in the `exclude_prefixes` array to determine which objects to exclude from
+       * a transfer. Objects must not start with one of the matching
+       * `exclude_prefixes` for inclusion in a transfer.
+       * The following are requirements of `exclude_prefixes`:
+       *   * Each exclude-prefix can contain any sequence of Unicode characters, to
+       *     a max length of 1024 bytes when UTF8-encoded, and must not contain
+       *     Carriage Return or Line Feed characters.  Wildcard matching and regular
+       *     expression matching are not supported.
+       *   * Each exclude-prefix must omit the leading slash. For example, to
+       *     exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`,
+       *     specify the exclude-prefix as `logs/y=2015/requests.gz`.
+       *   * None of the exclude-prefix values can be empty, if specified.
+       *   * Each exclude-prefix must exclude a distinct portion of the object
+       *     namespace. No exclude-prefix may be a prefix of another
+       *     exclude-prefix.
+       *   * If [include_prefixes]
+       *     [google.storagetransfer.v1.ObjectConditions.include_prefixes] is
+       *     specified, then each exclude-prefix must start with the value of a path
+       *     explicitly included by `include_prefixes`.
+       * The max size of `exclude_prefixes` is 1000.
+       * For more information, see [Filtering objects from
+       * transfers](/storage-transfer/docs/filtering-objects-from-transfers).
+       * 
+ * + * repeated string exclude_prefixes = 4; + * + * @param value The bytes of the excludePrefixes to add. + * @return This builder for chaining. + */ + public Builder addExcludePrefixesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureExcludePrefixesIsMutable(); + excludePrefixes_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastModifiedSince_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastModifiedSinceBuilder_; + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * this timestamp and objects that don't have a "last modification time" are
+       * transferred.
+       * The `last_modified_since` and `last_modified_before` fields can be used
+       * together for chunked data processing. For example, consider a script that
+       * processes each day's worth of data at a time. For that you'd set each
+       * of the fields as follows:
+       * *  `last_modified_since` to the start of the day
+       * *  `last_modified_before` to the end of the day
+       * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + * + * @return Whether the lastModifiedSince field is set. + */ + public boolean hasLastModifiedSince() { + return lastModifiedSinceBuilder_ != null || lastModifiedSince_ != null; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * this timestamp and objects that don't have a "last modification time" are
+       * transferred.
+       * The `last_modified_since` and `last_modified_before` fields can be used
+       * together for chunked data processing. For example, consider a script that
+       * processes each day's worth of data at a time. For that you'd set each
+       * of the fields as follows:
+       * *  `last_modified_since` to the start of the day
+       * *  `last_modified_before` to the end of the day
+       * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + * + * @return The lastModifiedSince. + */ + public com.google.protobuf.Timestamp getLastModifiedSince() { + if (lastModifiedSinceBuilder_ == null) { + return lastModifiedSince_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastModifiedSince_; + } else { + return lastModifiedSinceBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * this timestamp and objects that don't have a "last modification time" are
+       * transferred.
+       * The `last_modified_since` and `last_modified_before` fields can be used
+       * together for chunked data processing. For example, consider a script that
+       * processes each day's worth of data at a time. For that you'd set each
+       * of the fields as follows:
+       * *  `last_modified_since` to the start of the day
+       * *  `last_modified_before` to the end of the day
+       * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + */ + public Builder setLastModifiedSince(com.google.protobuf.Timestamp value) { + if (lastModifiedSinceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastModifiedSince_ = value; + onChanged(); + } else { + lastModifiedSinceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * this timestamp and objects that don't have a "last modification time" are
+       * transferred.
+       * The `last_modified_since` and `last_modified_before` fields can be used
+       * together for chunked data processing. For example, consider a script that
+       * processes each day's worth of data at a time. For that you'd set each
+       * of the fields as follows:
+       * *  `last_modified_since` to the start of the day
+       * *  `last_modified_before` to the end of the day
+       * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + */ + public Builder setLastModifiedSince(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastModifiedSinceBuilder_ == null) { + lastModifiedSince_ = builderForValue.build(); + onChanged(); + } else { + lastModifiedSinceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * this timestamp and objects that don't have a "last modification time" are
+       * transferred.
+       * The `last_modified_since` and `last_modified_before` fields can be used
+       * together for chunked data processing. For example, consider a script that
+       * processes each day's worth of data at a time. For that you'd set each
+       * of the fields as follows:
+       * *  `last_modified_since` to the start of the day
+       * *  `last_modified_before` to the end of the day
+       * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + */ + public Builder mergeLastModifiedSince(com.google.protobuf.Timestamp value) { + if (lastModifiedSinceBuilder_ == null) { + if (lastModifiedSince_ != null) { + lastModifiedSince_ = + com.google.protobuf.Timestamp.newBuilder(lastModifiedSince_) + .mergeFrom(value) + .buildPartial(); + } else { + lastModifiedSince_ = value; + } + onChanged(); + } else { + lastModifiedSinceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * this timestamp and objects that don't have a "last modification time" are
+       * transferred.
+       * The `last_modified_since` and `last_modified_before` fields can be used
+       * together for chunked data processing. For example, consider a script that
+       * processes each day's worth of data at a time. For that you'd set each
+       * of the fields as follows:
+       * *  `last_modified_since` to the start of the day
+       * *  `last_modified_before` to the end of the day
+       * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + */ + public Builder clearLastModifiedSince() { + if (lastModifiedSinceBuilder_ == null) { + lastModifiedSince_ = null; + onChanged(); + } else { + lastModifiedSince_ = null; + lastModifiedSinceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * this timestamp and objects that don't have a "last modification time" are
+       * transferred.
+       * The `last_modified_since` and `last_modified_before` fields can be used
+       * together for chunked data processing. For example, consider a script that
+       * processes each day's worth of data at a time. For that you'd set each
+       * of the fields as follows:
+       * *  `last_modified_since` to the start of the day
+       * *  `last_modified_before` to the end of the day
+       * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + */ + public com.google.protobuf.Timestamp.Builder getLastModifiedSinceBuilder() { + + onChanged(); + return getLastModifiedSinceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * this timestamp and objects that don't have a "last modification time" are
+       * transferred.
+       * The `last_modified_since` and `last_modified_before` fields can be used
+       * together for chunked data processing. For example, consider a script that
+       * processes each day's worth of data at a time. For that you'd set each
+       * of the fields as follows:
+       * *  `last_modified_since` to the start of the day
+       * *  `last_modified_before` to the end of the day
+       * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + */ + public com.google.protobuf.TimestampOrBuilder getLastModifiedSinceOrBuilder() { + if (lastModifiedSinceBuilder_ != null) { + return lastModifiedSinceBuilder_.getMessageOrBuilder(); + } else { + return lastModifiedSince_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastModifiedSince_; + } + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" on or after
+       * this timestamp and objects that don't have a "last modification time" are
+       * transferred.
+       * The `last_modified_since` and `last_modified_before` fields can be used
+       * together for chunked data processing. For example, consider a script that
+       * processes each day's worth of data at a time. For that you'd set each
+       * of the fields as follows:
+       * *  `last_modified_since` to the start of the day
+       * *  `last_modified_before` to the end of the day
+       * 
+ * + * .google.protobuf.Timestamp last_modified_since = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastModifiedSinceFieldBuilder() { + if (lastModifiedSinceBuilder_ == null) { + lastModifiedSinceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastModifiedSince(), getParentForChildren(), isClean()); + lastModifiedSince_ = null; + } + return lastModifiedSinceBuilder_; + } + + private com.google.protobuf.Timestamp lastModifiedBefore_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastModifiedBeforeBuilder_; + /** + * + * + *
+       * If specified, only objects with a "last modification time" before this
+       * timestamp and objects that don't have a "last modification time" will be
+       * transferred.
+       * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + * + * @return Whether the lastModifiedBefore field is set. + */ + public boolean hasLastModifiedBefore() { + return lastModifiedBeforeBuilder_ != null || lastModifiedBefore_ != null; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before this
+       * timestamp and objects that don't have a "last modification time" will be
+       * transferred.
+       * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + * + * @return The lastModifiedBefore. + */ + public com.google.protobuf.Timestamp getLastModifiedBefore() { + if (lastModifiedBeforeBuilder_ == null) { + return lastModifiedBefore_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastModifiedBefore_; + } else { + return lastModifiedBeforeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before this
+       * timestamp and objects that don't have a "last modification time" will be
+       * transferred.
+       * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + */ + public Builder setLastModifiedBefore(com.google.protobuf.Timestamp value) { + if (lastModifiedBeforeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastModifiedBefore_ = value; + onChanged(); + } else { + lastModifiedBeforeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before this
+       * timestamp and objects that don't have a "last modification time" will be
+       * transferred.
+       * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + */ + public Builder setLastModifiedBefore(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastModifiedBeforeBuilder_ == null) { + lastModifiedBefore_ = builderForValue.build(); + onChanged(); + } else { + lastModifiedBeforeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before this
+       * timestamp and objects that don't have a "last modification time" will be
+       * transferred.
+       * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + */ + public Builder mergeLastModifiedBefore(com.google.protobuf.Timestamp value) { + if (lastModifiedBeforeBuilder_ == null) { + if (lastModifiedBefore_ != null) { + lastModifiedBefore_ = + com.google.protobuf.Timestamp.newBuilder(lastModifiedBefore_) + .mergeFrom(value) + .buildPartial(); + } else { + lastModifiedBefore_ = value; + } + onChanged(); + } else { + lastModifiedBeforeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before this
+       * timestamp and objects that don't have a "last modification time" will be
+       * transferred.
+       * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + */ + public Builder clearLastModifiedBefore() { + if (lastModifiedBeforeBuilder_ == null) { + lastModifiedBefore_ = null; + onChanged(); + } else { + lastModifiedBefore_ = null; + lastModifiedBeforeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before this
+       * timestamp and objects that don't have a "last modification time" will be
+       * transferred.
+       * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + */ + public com.google.protobuf.Timestamp.Builder getLastModifiedBeforeBuilder() { + + onChanged(); + return getLastModifiedBeforeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before this
+       * timestamp and objects that don't have a "last modification time" will be
+       * transferred.
+       * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + */ + public com.google.protobuf.TimestampOrBuilder getLastModifiedBeforeOrBuilder() { + if (lastModifiedBeforeBuilder_ != null) { + return lastModifiedBeforeBuilder_.getMessageOrBuilder(); + } else { + return lastModifiedBefore_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastModifiedBefore_; + } + } + /** + * + * + *
+       * If specified, only objects with a "last modification time" before this
+       * timestamp and objects that don't have a "last modification time" will be
+       * transferred.
+       * 
+ * + * .google.protobuf.Timestamp last_modified_before = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastModifiedBeforeFieldBuilder() { + if (lastModifiedBeforeBuilder_ == null) { + lastModifiedBeforeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastModifiedBefore(), getParentForChildren(), isClean()); + lastModifiedBefore_ = null; + } + return lastModifiedBeforeBuilder_; + } + + @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.storagetransfer.v1.ObjectConditions) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.ObjectConditions) + private static final com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ObjectConditions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ObjectConditions(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.storagetransfer.v1.proto.TransferTypes.ObjectConditions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GcsDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.GcsData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Cloud Storage bucket name. Must meet
+     * [Bucket Name Requirements](/storage/docs/naming#requirements).
+     * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucketName. + */ + java.lang.String getBucketName(); + /** + * + * + *
+     * Required. Cloud Storage bucket name. Must meet
+     * [Bucket Name Requirements](/storage/docs/naming#requirements).
+     * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucketName. + */ + com.google.protobuf.ByteString getBucketNameBytes(); + + /** + * + * + *
+     * Root path to transfer objects.
+     * Must be an empty string or full path name that ends with a '/'. This field
+     * is treated as an object prefix. As such, it should generally not begin with
+     * a '/'.
+     * The root path value must meet
+     * [Object Name Requirements](/storage/docs/naming#objectnames).
+     * 
+ * + * string path = 3; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+     * Root path to transfer objects.
+     * Must be an empty string or full path name that ends with a '/'. This field
+     * is treated as an object prefix. As such, it should generally not begin with
+     * a '/'.
+     * The root path value must meet
+     * [Object Name Requirements](/storage/docs/naming#objectnames).
+     * 
+ * + * string path = 3; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + } + /** + * + * + *
+   * In a GcsData resource, an object's name is the Cloud Storage object's
+   * name and its "last modification time" refers to the object's `updated`
+   * property of Cloud Storage objects, which changes when the content or the
+   * metadata of the object is updated.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.GcsData} + */ + public static final class GcsData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.GcsData) + GcsDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsData.newBuilder() to construct. + private GcsData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsData() { + bucketName_ = ""; + path_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GcsData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsData( + 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(); + + bucketName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + path_ = 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.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_GcsData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_GcsData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.class, + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder.class); + } + + public static final int BUCKET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object bucketName_; + /** + * + * + *
+     * Required. Cloud Storage bucket name. Must meet
+     * [Bucket Name Requirements](/storage/docs/naming#requirements).
+     * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucketName. + */ + @java.lang.Override + public java.lang.String getBucketName() { + java.lang.Object ref = bucketName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucketName_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Cloud Storage bucket name. Must meet
+     * [Bucket Name Requirements](/storage/docs/naming#requirements).
+     * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucketName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBucketNameBytes() { + java.lang.Object ref = bucketName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucketName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 3; + private volatile java.lang.Object path_; + /** + * + * + *
+     * Root path to transfer objects.
+     * Must be an empty string or full path name that ends with a '/'. This field
+     * is treated as an object prefix. As such, it should generally not begin with
+     * a '/'.
+     * The root path value must meet
+     * [Object Name Requirements](/storage/docs/naming#objectnames).
+     * 
+ * + * string path = 3; + * + * @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; + } + } + /** + * + * + *
+     * Root path to transfer objects.
+     * Must be an empty string or full path name that ends with a '/'. This field
+     * is treated as an object prefix. As such, it should generally not begin with
+     * a '/'.
+     * The root path value must meet
+     * [Object Name Requirements](/storage/docs/naming#objectnames).
+     * 
+ * + * string path = 3; + * + * @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; + } + } + + 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 (!getBucketNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bucketName_); + } + if (!getPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, path_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getBucketNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bucketName_); + } + if (!getPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, path_); + } + 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.storagetransfer.v1.proto.TransferTypes.GcsData)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.GcsData other = + (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) obj; + + if (!getBucketName().equals(other.getBucketName())) return false; + if (!getPath().equals(other.getPath())) 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) + BUCKET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBucketName().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GcsData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GcsData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GcsData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GcsData 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.storagetransfer.v1.proto.TransferTypes.GcsData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GcsData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GcsData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GcsData 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.storagetransfer.v1.proto.TransferTypes.GcsData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GcsData 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.storagetransfer.v1.proto.TransferTypes.GcsData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GcsData 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.storagetransfer.v1.proto.TransferTypes.GcsData 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; + } + /** + * + * + *
+     * In a GcsData resource, an object's name is the Cloud Storage object's
+     * name and its "last modification time" refers to the object's `updated`
+     * property of Cloud Storage objects, which changes when the content or the
+     * metadata of the object is updated.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.GcsData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.GcsData) + com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_GcsData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_GcsData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.class, + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder.class); + } + + // Construct using com.google.storagetransfer.v1.proto.TransferTypes.GcsData.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(); + bucketName_ = ""; + + path_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_GcsData_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GcsData getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GcsData build() { + com.google.storagetransfer.v1.proto.TransferTypes.GcsData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GcsData buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.GcsData result = + new com.google.storagetransfer.v1.proto.TransferTypes.GcsData(this); + result.bucketName_ = bucketName_; + result.path_ = path_; + 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.storagetransfer.v1.proto.TransferTypes.GcsData) { + return mergeFrom((com.google.storagetransfer.v1.proto.TransferTypes.GcsData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storagetransfer.v1.proto.TransferTypes.GcsData other) { + if (other == com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance()) + return this; + if (!other.getBucketName().isEmpty()) { + bucketName_ = other.bucketName_; + onChanged(); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + 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.storagetransfer.v1.proto.TransferTypes.GcsData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object bucketName_ = ""; + /** + * + * + *
+       * Required. Cloud Storage bucket name. Must meet
+       * [Bucket Name Requirements](/storage/docs/naming#requirements).
+       * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucketName. + */ + public java.lang.String getBucketName() { + java.lang.Object ref = bucketName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucketName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Cloud Storage bucket name. Must meet
+       * [Bucket Name Requirements](/storage/docs/naming#requirements).
+       * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucketName. + */ + public com.google.protobuf.ByteString getBucketNameBytes() { + java.lang.Object ref = bucketName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucketName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Cloud Storage bucket name. Must meet
+       * [Bucket Name Requirements](/storage/docs/naming#requirements).
+       * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bucketName to set. + * @return This builder for chaining. + */ + public Builder setBucketName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + bucketName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Cloud Storage bucket name. Must meet
+       * [Bucket Name Requirements](/storage/docs/naming#requirements).
+       * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBucketName() { + + bucketName_ = getDefaultInstance().getBucketName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Cloud Storage bucket name. Must meet
+       * [Bucket Name Requirements](/storage/docs/naming#requirements).
+       * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for bucketName to set. + * @return This builder for chaining. + */ + public Builder setBucketNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + bucketName_ = value; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * The root path value must meet
+       * [Object Name Requirements](/storage/docs/naming#objectnames).
+       * 
+ * + * string path = 3; + * + * @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; + } + } + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * The root path value must meet
+       * [Object Name Requirements](/storage/docs/naming#objectnames).
+       * 
+ * + * string path = 3; + * + * @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; + } + } + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * The root path value must meet
+       * [Object Name Requirements](/storage/docs/naming#objectnames).
+       * 
+ * + * string path = 3; + * + * @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; + } + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * The root path value must meet
+       * [Object Name Requirements](/storage/docs/naming#objectnames).
+       * 
+ * + * string path = 3; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * The root path value must meet
+       * [Object Name Requirements](/storage/docs/naming#objectnames).
+       * 
+ * + * string path = 3; + * + * @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; + } + + @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.storagetransfer.v1.GcsData) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.GcsData) + private static final com.google.storagetransfer.v1.proto.TransferTypes.GcsData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.GcsData(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.GcsData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsData(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.storagetransfer.v1.proto.TransferTypes.GcsData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AwsS3DataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.AwsS3Data) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. S3 Bucket name (see
+     * [Creating a
+     * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
+     * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucketName. + */ + java.lang.String getBucketName(); + /** + * + * + *
+     * Required. S3 Bucket name (see
+     * [Creating a
+     * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
+     * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucketName. + */ + com.google.protobuf.ByteString getBucketNameBytes(); + + /** + * + * + *
+     * Input only. AWS access key used to sign the API requests to the AWS S3
+     * bucket. Permissions on the bucket must be granted to the access ID of the
+     * AWS access key. This field is required.
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the awsAccessKey field is set. + */ + boolean hasAwsAccessKey(); + /** + * + * + *
+     * Input only. AWS access key used to sign the API requests to the AWS S3
+     * bucket. Permissions on the bucket must be granted to the access ID of the
+     * AWS access key. This field is required.
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The awsAccessKey. + */ + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey getAwsAccessKey(); + /** + * + * + *
+     * Input only. AWS access key used to sign the API requests to the AWS S3
+     * bucket. Permissions on the bucket must be granted to the access ID of the
+     * AWS access key. This field is required.
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKeyOrBuilder + getAwsAccessKeyOrBuilder(); + + /** + * + * + *
+     * Root path to transfer objects.
+     * Must be an empty string or full path name that ends with a '/'. This field
+     * is treated as an object prefix. As such, it should generally not begin with
+     * a '/'.
+     * 
+ * + * string path = 3; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+     * Root path to transfer objects.
+     * Must be an empty string or full path name that ends with a '/'. This field
+     * is treated as an object prefix. As such, it should generally not begin with
+     * a '/'.
+     * 
+ * + * string path = 3; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + + /** + * + * + *
+     * Input only. Role arn to support temporary credentials via
+     * AssumeRoleWithWebIdentity.
+     * When role arn is provided, transfer service will fetch temporary
+     * credentials for the session using AssumeRoleWithWebIdentity call for the
+     * provided role using the [GoogleServiceAccount] for this project.
+     * 
+ * + * string role_arn = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The roleArn. + */ + java.lang.String getRoleArn(); + /** + * + * + *
+     * Input only. Role arn to support temporary credentials via
+     * AssumeRoleWithWebIdentity.
+     * When role arn is provided, transfer service will fetch temporary
+     * credentials for the session using AssumeRoleWithWebIdentity call for the
+     * provided role using the [GoogleServiceAccount] for this project.
+     * 
+ * + * string role_arn = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for roleArn. + */ + com.google.protobuf.ByteString getRoleArnBytes(); + } + /** + * + * + *
+   * An AwsS3Data resource can be a data source, but not a data sink.
+   * In an AwsS3Data resource, an object's name is the S3 object's key name.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.AwsS3Data} + */ + public static final class AwsS3Data extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.AwsS3Data) + AwsS3DataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AwsS3Data.newBuilder() to construct. + private AwsS3Data(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AwsS3Data() { + bucketName_ = ""; + path_ = ""; + roleArn_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AwsS3Data(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AwsS3Data( + 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(); + + bucketName_ = s; + break; + } + case 18: + { + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.Builder subBuilder = + null; + if (awsAccessKey_ != null) { + subBuilder = awsAccessKey_.toBuilder(); + } + awsAccessKey_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(awsAccessKey_); + awsAccessKey_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + path_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + roleArn_ = 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.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AwsS3Data_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AwsS3Data_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.class, + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.Builder.class); + } + + public static final int BUCKET_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object bucketName_; + /** + * + * + *
+     * Required. S3 Bucket name (see
+     * [Creating a
+     * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
+     * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucketName. + */ + @java.lang.Override + public java.lang.String getBucketName() { + java.lang.Object ref = bucketName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucketName_ = s; + return s; + } + } + /** + * + * + *
+     * Required. S3 Bucket name (see
+     * [Creating a
+     * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
+     * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucketName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBucketNameBytes() { + java.lang.Object ref = bucketName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucketName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AWS_ACCESS_KEY_FIELD_NUMBER = 2; + private com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey awsAccessKey_; + /** + * + * + *
+     * Input only. AWS access key used to sign the API requests to the AWS S3
+     * bucket. Permissions on the bucket must be granted to the access ID of the
+     * AWS access key. This field is required.
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the awsAccessKey field is set. + */ + @java.lang.Override + public boolean hasAwsAccessKey() { + return awsAccessKey_ != null; + } + /** + * + * + *
+     * Input only. AWS access key used to sign the API requests to the AWS S3
+     * bucket. Permissions on the bucket must be granted to the access ID of the
+     * AWS access key. This field is required.
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The awsAccessKey. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey getAwsAccessKey() { + return awsAccessKey_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.getDefaultInstance() + : awsAccessKey_; + } + /** + * + * + *
+     * Input only. AWS access key used to sign the API requests to the AWS S3
+     * bucket. Permissions on the bucket must be granted to the access ID of the
+     * AWS access key. This field is required.
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKeyOrBuilder + getAwsAccessKeyOrBuilder() { + return getAwsAccessKey(); + } + + public static final int PATH_FIELD_NUMBER = 3; + private volatile java.lang.Object path_; + /** + * + * + *
+     * Root path to transfer objects.
+     * Must be an empty string or full path name that ends with a '/'. This field
+     * is treated as an object prefix. As such, it should generally not begin with
+     * a '/'.
+     * 
+ * + * string path = 3; + * + * @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; + } + } + /** + * + * + *
+     * Root path to transfer objects.
+     * Must be an empty string or full path name that ends with a '/'. This field
+     * is treated as an object prefix. As such, it should generally not begin with
+     * a '/'.
+     * 
+ * + * string path = 3; + * + * @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 ROLE_ARN_FIELD_NUMBER = 4; + private volatile java.lang.Object roleArn_; + /** + * + * + *
+     * Input only. Role arn to support temporary credentials via
+     * AssumeRoleWithWebIdentity.
+     * When role arn is provided, transfer service will fetch temporary
+     * credentials for the session using AssumeRoleWithWebIdentity call for the
+     * provided role using the [GoogleServiceAccount] for this project.
+     * 
+ * + * string role_arn = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The roleArn. + */ + @java.lang.Override + public java.lang.String getRoleArn() { + java.lang.Object ref = roleArn_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roleArn_ = s; + return s; + } + } + /** + * + * + *
+     * Input only. Role arn to support temporary credentials via
+     * AssumeRoleWithWebIdentity.
+     * When role arn is provided, transfer service will fetch temporary
+     * credentials for the session using AssumeRoleWithWebIdentity call for the
+     * provided role using the [GoogleServiceAccount] for this project.
+     * 
+ * + * string role_arn = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for roleArn. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRoleArnBytes() { + java.lang.Object ref = roleArn_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + roleArn_ = 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 (!getBucketNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bucketName_); + } + if (awsAccessKey_ != null) { + output.writeMessage(2, getAwsAccessKey()); + } + if (!getPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, path_); + } + if (!getRoleArnBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, roleArn_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getBucketNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bucketName_); + } + if (awsAccessKey_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAwsAccessKey()); + } + if (!getPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, path_); + } + if (!getRoleArnBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, roleArn_); + } + 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.storagetransfer.v1.proto.TransferTypes.AwsS3Data)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data other = + (com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) obj; + + if (!getBucketName().equals(other.getBucketName())) return false; + if (hasAwsAccessKey() != other.hasAwsAccessKey()) return false; + if (hasAwsAccessKey()) { + if (!getAwsAccessKey().equals(other.getAwsAccessKey())) return false; + } + if (!getPath().equals(other.getPath())) return false; + if (!getRoleArn().equals(other.getRoleArn())) 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) + BUCKET_NAME_FIELD_NUMBER; + hash = (53 * hash) + getBucketName().hashCode(); + if (hasAwsAccessKey()) { + hash = (37 * hash) + AWS_ACCESS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getAwsAccessKey().hashCode(); + } + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + ROLE_ARN_FIELD_NUMBER; + hash = (53 * hash) + getRoleArn().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data 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.storagetransfer.v1.proto.TransferTypes.AwsS3Data parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data 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.storagetransfer.v1.proto.TransferTypes.AwsS3Data parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data 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.storagetransfer.v1.proto.TransferTypes.AwsS3Data parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data 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.storagetransfer.v1.proto.TransferTypes.AwsS3Data 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 AwsS3Data resource can be a data source, but not a data sink.
+     * In an AwsS3Data resource, an object's name is the S3 object's key name.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.AwsS3Data} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.AwsS3Data) + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3DataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AwsS3Data_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AwsS3Data_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.class, + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.Builder.class); + } + + // Construct using com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.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(); + bucketName_ = ""; + + if (awsAccessKeyBuilder_ == null) { + awsAccessKey_ = null; + } else { + awsAccessKey_ = null; + awsAccessKeyBuilder_ = null; + } + path_ = ""; + + roleArn_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AwsS3Data_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data build() { + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data result = + new com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data(this); + result.bucketName_ = bucketName_; + if (awsAccessKeyBuilder_ == null) { + result.awsAccessKey_ = awsAccessKey_; + } else { + result.awsAccessKey_ = awsAccessKeyBuilder_.build(); + } + result.path_ = path_; + result.roleArn_ = roleArn_; + 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.storagetransfer.v1.proto.TransferTypes.AwsS3Data) { + return mergeFrom((com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.getDefaultInstance()) + return this; + if (!other.getBucketName().isEmpty()) { + bucketName_ = other.bucketName_; + onChanged(); + } + if (other.hasAwsAccessKey()) { + mergeAwsAccessKey(other.getAwsAccessKey()); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + if (!other.getRoleArn().isEmpty()) { + roleArn_ = other.roleArn_; + 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.storagetransfer.v1.proto.TransferTypes.AwsS3Data parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object bucketName_ = ""; + /** + * + * + *
+       * Required. S3 Bucket name (see
+       * [Creating a
+       * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
+       * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bucketName. + */ + public java.lang.String getBucketName() { + java.lang.Object ref = bucketName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + bucketName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. S3 Bucket name (see
+       * [Creating a
+       * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
+       * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for bucketName. + */ + public com.google.protobuf.ByteString getBucketNameBytes() { + java.lang.Object ref = bucketName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + bucketName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. S3 Bucket name (see
+       * [Creating a
+       * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
+       * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bucketName to set. + * @return This builder for chaining. + */ + public Builder setBucketName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + bucketName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. S3 Bucket name (see
+       * [Creating a
+       * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
+       * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearBucketName() { + + bucketName_ = getDefaultInstance().getBucketName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. S3 Bucket name (see
+       * [Creating a
+       * bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).
+       * 
+ * + * string bucket_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for bucketName to set. + * @return This builder for chaining. + */ + public Builder setBucketNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + bucketName_ = value; + onChanged(); + return this; + } + + private com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey awsAccessKey_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey, + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKeyOrBuilder> + awsAccessKeyBuilder_; + /** + * + * + *
+       * Input only. AWS access key used to sign the API requests to the AWS S3
+       * bucket. Permissions on the bucket must be granted to the access ID of the
+       * AWS access key. This field is required.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the awsAccessKey field is set. + */ + public boolean hasAwsAccessKey() { + return awsAccessKeyBuilder_ != null || awsAccessKey_ != null; + } + /** + * + * + *
+       * Input only. AWS access key used to sign the API requests to the AWS S3
+       * bucket. Permissions on the bucket must be granted to the access ID of the
+       * AWS access key. This field is required.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The awsAccessKey. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey getAwsAccessKey() { + if (awsAccessKeyBuilder_ == null) { + return awsAccessKey_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.getDefaultInstance() + : awsAccessKey_; + } else { + return awsAccessKeyBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Input only. AWS access key used to sign the API requests to the AWS S3
+       * bucket. Permissions on the bucket must be granted to the access ID of the
+       * AWS access key. This field is required.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setAwsAccessKey( + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey value) { + if (awsAccessKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + awsAccessKey_ = value; + onChanged(); + } else { + awsAccessKeyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Input only. AWS access key used to sign the API requests to the AWS S3
+       * bucket. Permissions on the bucket must be granted to the access ID of the
+       * AWS access key. This field is required.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setAwsAccessKey( + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.Builder builderForValue) { + if (awsAccessKeyBuilder_ == null) { + awsAccessKey_ = builderForValue.build(); + onChanged(); + } else { + awsAccessKeyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Input only. AWS access key used to sign the API requests to the AWS S3
+       * bucket. Permissions on the bucket must be granted to the access ID of the
+       * AWS access key. This field is required.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeAwsAccessKey( + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey value) { + if (awsAccessKeyBuilder_ == null) { + if (awsAccessKey_ != null) { + awsAccessKey_ = + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.newBuilder( + awsAccessKey_) + .mergeFrom(value) + .buildPartial(); + } else { + awsAccessKey_ = value; + } + onChanged(); + } else { + awsAccessKeyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Input only. AWS access key used to sign the API requests to the AWS S3
+       * bucket. Permissions on the bucket must be granted to the access ID of the
+       * AWS access key. This field is required.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearAwsAccessKey() { + if (awsAccessKeyBuilder_ == null) { + awsAccessKey_ = null; + onChanged(); + } else { + awsAccessKey_ = null; + awsAccessKeyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Input only. AWS access key used to sign the API requests to the AWS S3
+       * bucket. Permissions on the bucket must be granted to the access ID of the
+       * AWS access key. This field is required.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.Builder + getAwsAccessKeyBuilder() { + + onChanged(); + return getAwsAccessKeyFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Input only. AWS access key used to sign the API requests to the AWS S3
+       * bucket. Permissions on the bucket must be granted to the access ID of the
+       * AWS access key. This field is required.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKeyOrBuilder + getAwsAccessKeyOrBuilder() { + if (awsAccessKeyBuilder_ != null) { + return awsAccessKeyBuilder_.getMessageOrBuilder(); + } else { + return awsAccessKey_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.getDefaultInstance() + : awsAccessKey_; + } + } + /** + * + * + *
+       * Input only. AWS access key used to sign the API requests to the AWS S3
+       * bucket. Permissions on the bucket must be granted to the access ID of the
+       * AWS access key. This field is required.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AwsAccessKey aws_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey, + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKeyOrBuilder> + getAwsAccessKeyFieldBuilder() { + if (awsAccessKeyBuilder_ == null) { + awsAccessKeyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey, + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKey.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.AwsAccessKeyOrBuilder>( + getAwsAccessKey(), getParentForChildren(), isClean()); + awsAccessKey_ = null; + } + return awsAccessKeyBuilder_; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * 
+ * + * string path = 3; + * + * @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; + } + } + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * 
+ * + * string path = 3; + * + * @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; + } + } + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * 
+ * + * string path = 3; + * + * @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; + } + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * 
+ * + * string path = 3; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * 
+ * + * string path = 3; + * + * @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 java.lang.Object roleArn_ = ""; + /** + * + * + *
+       * Input only. Role arn to support temporary credentials via
+       * AssumeRoleWithWebIdentity.
+       * When role arn is provided, transfer service will fetch temporary
+       * credentials for the session using AssumeRoleWithWebIdentity call for the
+       * provided role using the [GoogleServiceAccount] for this project.
+       * 
+ * + * string role_arn = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The roleArn. + */ + public java.lang.String getRoleArn() { + java.lang.Object ref = roleArn_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + roleArn_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Input only. Role arn to support temporary credentials via
+       * AssumeRoleWithWebIdentity.
+       * When role arn is provided, transfer service will fetch temporary
+       * credentials for the session using AssumeRoleWithWebIdentity call for the
+       * provided role using the [GoogleServiceAccount] for this project.
+       * 
+ * + * string role_arn = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return The bytes for roleArn. + */ + public com.google.protobuf.ByteString getRoleArnBytes() { + java.lang.Object ref = roleArn_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + roleArn_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Input only. Role arn to support temporary credentials via
+       * AssumeRoleWithWebIdentity.
+       * When role arn is provided, transfer service will fetch temporary
+       * credentials for the session using AssumeRoleWithWebIdentity call for the
+       * provided role using the [GoogleServiceAccount] for this project.
+       * 
+ * + * string role_arn = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The roleArn to set. + * @return This builder for chaining. + */ + public Builder setRoleArn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + roleArn_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Input only. Role arn to support temporary credentials via
+       * AssumeRoleWithWebIdentity.
+       * When role arn is provided, transfer service will fetch temporary
+       * credentials for the session using AssumeRoleWithWebIdentity call for the
+       * provided role using the [GoogleServiceAccount] for this project.
+       * 
+ * + * string role_arn = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearRoleArn() { + + roleArn_ = getDefaultInstance().getRoleArn(); + onChanged(); + return this; + } + /** + * + * + *
+       * Input only. Role arn to support temporary credentials via
+       * AssumeRoleWithWebIdentity.
+       * When role arn is provided, transfer service will fetch temporary
+       * credentials for the session using AssumeRoleWithWebIdentity call for the
+       * provided role using the [GoogleServiceAccount] for this project.
+       * 
+ * + * string role_arn = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * + * @param value The bytes for roleArn to set. + * @return This builder for chaining. + */ + public Builder setRoleArnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + roleArn_ = 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.storagetransfer.v1.AwsS3Data) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.AwsS3Data) + private static final com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AwsS3Data parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AwsS3Data(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.storagetransfer.v1.proto.TransferTypes.AwsS3Data getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AzureBlobStorageDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.AzureBlobStorageData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the Azure Storage account.
+     * 
+ * + * string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The storageAccount. + */ + java.lang.String getStorageAccount(); + /** + * + * + *
+     * Required. The name of the Azure Storage account.
+     * 
+ * + * string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for storageAccount. + */ + com.google.protobuf.ByteString getStorageAccountBytes(); + + /** + * + * + *
+     * Required. Input only. Credentials used to authenticate API requests to
+     * Azure.
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the azureCredentials field is set. + */ + boolean hasAzureCredentials(); + /** + * + * + *
+     * Required. Input only. Credentials used to authenticate API requests to
+     * Azure.
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The azureCredentials. + */ + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials getAzureCredentials(); + /** + * + * + *
+     * Required. Input only. Credentials used to authenticate API requests to
+     * Azure.
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentialsOrBuilder + getAzureCredentialsOrBuilder(); + + /** + * + * + *
+     * Required. The container to transfer from the Azure Storage account.
+     * 
+ * + * string container = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The container. + */ + java.lang.String getContainer(); + /** + * + * + *
+     * Required. The container to transfer from the Azure Storage account.
+     * 
+ * + * string container = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for container. + */ + com.google.protobuf.ByteString getContainerBytes(); + + /** + * + * + *
+     * Root path to transfer objects.
+     * Must be an empty string or full path name that ends with a '/'. This field
+     * is treated as an object prefix. As such, it should generally not begin with
+     * a '/'.
+     * 
+ * + * string path = 5; + * + * @return The path. + */ + java.lang.String getPath(); + /** + * + * + *
+     * Root path to transfer objects.
+     * Must be an empty string or full path name that ends with a '/'. This field
+     * is treated as an object prefix. As such, it should generally not begin with
+     * a '/'.
+     * 
+ * + * string path = 5; + * + * @return The bytes for path. + */ + com.google.protobuf.ByteString getPathBytes(); + } + /** + * + * + *
+   * An AzureBlobStorageData resource can be a data source, but not a data sink.
+   * An AzureBlobStorageData resource represents one Azure container. The storage
+   * account determines the [Azure
+   * endpoint](https://docs.microsoft.com/en-us/azure/storage/common/storage-create-storage-account#storage-account-endpoints).
+   * In an AzureBlobStorageData resource, a blobs's name is the [Azure Blob
+   * Storage blob's key
+   * name](https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#blob-names).
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.AzureBlobStorageData} + */ + public static final class AzureBlobStorageData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.AzureBlobStorageData) + AzureBlobStorageDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use AzureBlobStorageData.newBuilder() to construct. + private AzureBlobStorageData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AzureBlobStorageData() { + storageAccount_ = ""; + container_ = ""; + path_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AzureBlobStorageData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AzureBlobStorageData( + 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(); + + storageAccount_ = s; + break; + } + case 18: + { + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.Builder + subBuilder = null; + if (azureCredentials_ != null) { + subBuilder = azureCredentials_.toBuilder(); + } + azureCredentials_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(azureCredentials_); + azureCredentials_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + container_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + path_ = 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.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AzureBlobStorageData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AzureBlobStorageData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData.class, + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData.Builder.class); + } + + public static final int STORAGE_ACCOUNT_FIELD_NUMBER = 1; + private volatile java.lang.Object storageAccount_; + /** + * + * + *
+     * Required. The name of the Azure Storage account.
+     * 
+ * + * string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The storageAccount. + */ + @java.lang.Override + public java.lang.String getStorageAccount() { + java.lang.Object ref = storageAccount_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + storageAccount_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The name of the Azure Storage account.
+     * 
+ * + * string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for storageAccount. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStorageAccountBytes() { + java.lang.Object ref = storageAccount_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + storageAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AZURE_CREDENTIALS_FIELD_NUMBER = 2; + private com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials azureCredentials_; + /** + * + * + *
+     * Required. Input only. Credentials used to authenticate API requests to
+     * Azure.
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the azureCredentials field is set. + */ + @java.lang.Override + public boolean hasAzureCredentials() { + return azureCredentials_ != null; + } + /** + * + * + *
+     * Required. Input only. Credentials used to authenticate API requests to
+     * Azure.
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The azureCredentials. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials + getAzureCredentials() { + return azureCredentials_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.getDefaultInstance() + : azureCredentials_; + } + /** + * + * + *
+     * Required. Input only. Credentials used to authenticate API requests to
+     * Azure.
+     * For information on our data retention policy for user credentials, see
+     * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+     * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentialsOrBuilder + getAzureCredentialsOrBuilder() { + return getAzureCredentials(); + } + + public static final int CONTAINER_FIELD_NUMBER = 4; + private volatile java.lang.Object container_; + /** + * + * + *
+     * Required. The container to transfer from the Azure Storage account.
+     * 
+ * + * string container = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The container. + */ + @java.lang.Override + public java.lang.String getContainer() { + java.lang.Object ref = container_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + container_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The container to transfer from the Azure Storage account.
+     * 
+ * + * string container = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for container. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContainerBytes() { + java.lang.Object ref = container_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + container_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PATH_FIELD_NUMBER = 5; + private volatile java.lang.Object path_; + /** + * + * + *
+     * Root path to transfer objects.
+     * Must be an empty string or full path name that ends with a '/'. This field
+     * is treated as an object prefix. As such, it should generally not begin with
+     * a '/'.
+     * 
+ * + * string path = 5; + * + * @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; + } + } + /** + * + * + *
+     * Root path to transfer objects.
+     * Must be an empty string or full path name that ends with a '/'. This field
+     * is treated as an object prefix. As such, it should generally not begin with
+     * a '/'.
+     * 
+ * + * string path = 5; + * + * @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; + } + } + + 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 (!getStorageAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, storageAccount_); + } + if (azureCredentials_ != null) { + output.writeMessage(2, getAzureCredentials()); + } + if (!getContainerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, container_); + } + if (!getPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, path_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getStorageAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, storageAccount_); + } + if (azureCredentials_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAzureCredentials()); + } + if (!getContainerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, container_); + } + if (!getPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, path_); + } + 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.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData other = + (com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) obj; + + if (!getStorageAccount().equals(other.getStorageAccount())) return false; + if (hasAzureCredentials() != other.hasAzureCredentials()) return false; + if (hasAzureCredentials()) { + if (!getAzureCredentials().equals(other.getAzureCredentials())) return false; + } + if (!getContainer().equals(other.getContainer())) return false; + if (!getPath().equals(other.getPath())) 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) + STORAGE_ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getStorageAccount().hashCode(); + if (hasAzureCredentials()) { + hash = (37 * hash) + AZURE_CREDENTIALS_FIELD_NUMBER; + hash = (53 * hash) + getAzureCredentials().hashCode(); + } + hash = (37 * hash) + CONTAINER_FIELD_NUMBER; + hash = (53 * hash) + getContainer().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData 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.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData 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.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + 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.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData 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.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData 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 AzureBlobStorageData resource can be a data source, but not a data sink.
+     * An AzureBlobStorageData resource represents one Azure container. The storage
+     * account determines the [Azure
+     * endpoint](https://docs.microsoft.com/en-us/azure/storage/common/storage-create-storage-account#storage-account-endpoints).
+     * In an AzureBlobStorageData resource, a blobs's name is the [Azure Blob
+     * Storage blob's key
+     * name](https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#blob-names).
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.AzureBlobStorageData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.AzureBlobStorageData) + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AzureBlobStorageData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AzureBlobStorageData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData.class, + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData.Builder + .class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData.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(); + storageAccount_ = ""; + + if (azureCredentialsBuilder_ == null) { + azureCredentials_ = null; + } else { + azureCredentials_ = null; + azureCredentialsBuilder_ = null; + } + container_ = ""; + + path_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_AzureBlobStorageData_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData build() { + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData result = + new com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData(this); + result.storageAccount_ = storageAccount_; + if (azureCredentialsBuilder_ == null) { + result.azureCredentials_ = azureCredentials_; + } else { + result.azureCredentials_ = azureCredentialsBuilder_.build(); + } + result.container_ = container_; + result.path_ = path_; + 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.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + .getDefaultInstance()) return this; + if (!other.getStorageAccount().isEmpty()) { + storageAccount_ = other.storageAccount_; + onChanged(); + } + if (other.hasAzureCredentials()) { + mergeAzureCredentials(other.getAzureCredentials()); + } + if (!other.getContainer().isEmpty()) { + container_ = other.container_; + onChanged(); + } + if (!other.getPath().isEmpty()) { + path_ = other.path_; + 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.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object storageAccount_ = ""; + /** + * + * + *
+       * Required. The name of the Azure Storage account.
+       * 
+ * + * string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The storageAccount. + */ + public java.lang.String getStorageAccount() { + java.lang.Object ref = storageAccount_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + storageAccount_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The name of the Azure Storage account.
+       * 
+ * + * string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for storageAccount. + */ + public com.google.protobuf.ByteString getStorageAccountBytes() { + java.lang.Object ref = storageAccount_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + storageAccount_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The name of the Azure Storage account.
+       * 
+ * + * string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The storageAccount to set. + * @return This builder for chaining. + */ + public Builder setStorageAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + storageAccount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of the Azure Storage account.
+       * 
+ * + * string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearStorageAccount() { + + storageAccount_ = getDefaultInstance().getStorageAccount(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name of the Azure Storage account.
+       * 
+ * + * string storage_account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for storageAccount to set. + * @return This builder for chaining. + */ + public Builder setStorageAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + storageAccount_ = value; + onChanged(); + return this; + } + + private com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials azureCredentials_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials, + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentialsOrBuilder> + azureCredentialsBuilder_; + /** + * + * + *
+       * Required. Input only. Credentials used to authenticate API requests to
+       * Azure.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return Whether the azureCredentials field is set. + */ + public boolean hasAzureCredentials() { + return azureCredentialsBuilder_ != null || azureCredentials_ != null; + } + /** + * + * + *
+       * Required. Input only. Credentials used to authenticate API requests to
+       * Azure.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + * + * @return The azureCredentials. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials + getAzureCredentials() { + if (azureCredentialsBuilder_ == null) { + return azureCredentials_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials + .getDefaultInstance() + : azureCredentials_; + } else { + return azureCredentialsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Input only. Credentials used to authenticate API requests to
+       * Azure.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setAzureCredentials( + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials value) { + if (azureCredentialsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + azureCredentials_ = value; + onChanged(); + } else { + azureCredentialsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. Input only. Credentials used to authenticate API requests to
+       * Azure.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder setAzureCredentials( + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.Builder + builderForValue) { + if (azureCredentialsBuilder_ == null) { + azureCredentials_ = builderForValue.build(); + onChanged(); + } else { + azureCredentialsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. Input only. Credentials used to authenticate API requests to
+       * Azure.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder mergeAzureCredentials( + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials value) { + if (azureCredentialsBuilder_ == null) { + if (azureCredentials_ != null) { + azureCredentials_ = + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.newBuilder( + azureCredentials_) + .mergeFrom(value) + .buildPartial(); + } else { + azureCredentials_ = value; + } + onChanged(); + } else { + azureCredentialsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. Input only. Credentials used to authenticate API requests to
+       * Azure.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public Builder clearAzureCredentials() { + if (azureCredentialsBuilder_ == null) { + azureCredentials_ = null; + onChanged(); + } else { + azureCredentials_ = null; + azureCredentialsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. Input only. Credentials used to authenticate API requests to
+       * Azure.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.Builder + getAzureCredentialsBuilder() { + + onChanged(); + return getAzureCredentialsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Input only. Credentials used to authenticate API requests to
+       * Azure.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + public com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentialsOrBuilder + getAzureCredentialsOrBuilder() { + if (azureCredentialsBuilder_ != null) { + return azureCredentialsBuilder_.getMessageOrBuilder(); + } else { + return azureCredentials_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials + .getDefaultInstance() + : azureCredentials_; + } + } + /** + * + * + *
+       * Required. Input only. Credentials used to authenticate API requests to
+       * Azure.
+       * For information on our data retention policy for user credentials, see
+       * [User credentials](/storage-transfer/docs/data-retention#user-credentials).
+       * 
+ * + * + * .google.storagetransfer.v1.AzureCredentials azure_credentials = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials, + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentialsOrBuilder> + getAzureCredentialsFieldBuilder() { + if (azureCredentialsBuilder_ == null) { + azureCredentialsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials, + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentials.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.AzureCredentialsOrBuilder>( + getAzureCredentials(), getParentForChildren(), isClean()); + azureCredentials_ = null; + } + return azureCredentialsBuilder_; + } + + private java.lang.Object container_ = ""; + /** + * + * + *
+       * Required. The container to transfer from the Azure Storage account.
+       * 
+ * + * string container = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The container. + */ + public java.lang.String getContainer() { + java.lang.Object ref = container_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + container_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The container to transfer from the Azure Storage account.
+       * 
+ * + * string container = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for container. + */ + public com.google.protobuf.ByteString getContainerBytes() { + java.lang.Object ref = container_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + container_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The container to transfer from the Azure Storage account.
+       * 
+ * + * string container = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The container to set. + * @return This builder for chaining. + */ + public Builder setContainer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + container_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The container to transfer from the Azure Storage account.
+       * 
+ * + * string container = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearContainer() { + + container_ = getDefaultInstance().getContainer(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The container to transfer from the Azure Storage account.
+       * 
+ * + * string container = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for container to set. + * @return This builder for chaining. + */ + public Builder setContainerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + container_ = value; + onChanged(); + return this; + } + + private java.lang.Object path_ = ""; + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * 
+ * + * string path = 5; + * + * @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; + } + } + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * 
+ * + * string path = 5; + * + * @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; + } + } + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * 
+ * + * string path = 5; + * + * @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; + } + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * 
+ * + * string path = 5; + * + * @return This builder for chaining. + */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * + * + *
+       * Root path to transfer objects.
+       * Must be an empty string or full path name that ends with a '/'. This field
+       * is treated as an object prefix. As such, it should generally not begin with
+       * a '/'.
+       * 
+ * + * string path = 5; + * + * @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; + } + + @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.storagetransfer.v1.AzureBlobStorageData) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.AzureBlobStorageData) + private static final com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AzureBlobStorageData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AzureBlobStorageData(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.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface HttpDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.HttpData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The URL that points to the file that stores the object list
+     * entries. This file must allow public access.  Currently, only URLs with
+     * HTTP and HTTPS schemes are supported.
+     * 
+ * + * string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The listUrl. + */ + java.lang.String getListUrl(); + /** + * + * + *
+     * Required. The URL that points to the file that stores the object list
+     * entries. This file must allow public access.  Currently, only URLs with
+     * HTTP and HTTPS schemes are supported.
+     * 
+ * + * string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for listUrl. + */ + com.google.protobuf.ByteString getListUrlBytes(); + } + /** + * + * + *
+   * An HttpData resource specifies a list of objects on the web to be transferred
+   * over HTTP.  The information of the objects to be transferred is contained in
+   * a file referenced by a URL. The first line in the file must be
+   * `"TsvHttpData-1.0"`, which specifies the format of the file.  Subsequent
+   * lines specify the information of the list of objects, one object per list
+   * entry. Each entry has the following tab-delimited fields:
+   * * **HTTP URL** — The location of the object.
+   * * **Length** — The size of the object in bytes.
+   * * **MD5** — The base64-encoded MD5 hash of the object.
+   * For an example of a valid TSV file, see
+   * [Transferring data from
+   * URLs](https://cloud.google.com/storage-transfer/docs/create-url-list).
+   * When transferring data based on a URL list, keep the following in mind:
+   * * When an object located at `http(s)://hostname:port/<URL-path>` is
+   * transferred to a data sink, the name of the object at the data sink is
+   * `<hostname>/<URL-path>`.
+   * * If the specified size of an object does not match the actual size of the
+   * object fetched, the object will not be transferred.
+   * * If the specified MD5 does not match the MD5 computed from the transferred
+   * bytes, the object transfer will fail.
+   * * Ensure that each URL you specify is publicly accessible. For
+   * example, in Cloud Storage you can
+   * [share an object publicly]
+   * (/storage/docs/cloud-console#_sharingdata) and get a link to it.
+   * * Storage Transfer Service obeys `robots.txt` rules and requires the source
+   * HTTP server to support `Range` requests and to return a `Content-Length`
+   * header in each response.
+   * * [ObjectConditions][google.storagetransfer.v1.ObjectConditions] have no
+   * effect when filtering objects to transfer.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.HttpData} + */ + public static final class HttpData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.HttpData) + HttpDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use HttpData.newBuilder() to construct. + private HttpData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HttpData() { + listUrl_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HttpData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private HttpData( + 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(); + + listUrl_ = 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.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_HttpData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_HttpData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.HttpData.class, + com.google.storagetransfer.v1.proto.TransferTypes.HttpData.Builder.class); + } + + public static final int LIST_URL_FIELD_NUMBER = 1; + private volatile java.lang.Object listUrl_; + /** + * + * + *
+     * Required. The URL that points to the file that stores the object list
+     * entries. This file must allow public access.  Currently, only URLs with
+     * HTTP and HTTPS schemes are supported.
+     * 
+ * + * string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The listUrl. + */ + @java.lang.Override + public java.lang.String getListUrl() { + java.lang.Object ref = listUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + listUrl_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The URL that points to the file that stores the object list
+     * entries. This file must allow public access.  Currently, only URLs with
+     * HTTP and HTTPS schemes are supported.
+     * 
+ * + * string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for listUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString getListUrlBytes() { + java.lang.Object ref = listUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + listUrl_ = 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 (!getListUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, listUrl_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getListUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, listUrl_); + } + 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.storagetransfer.v1.proto.TransferTypes.HttpData)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.HttpData other = + (com.google.storagetransfer.v1.proto.TransferTypes.HttpData) obj; + + if (!getListUrl().equals(other.getListUrl())) 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) + LIST_URL_FIELD_NUMBER; + hash = (53 * hash) + getListUrl().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.HttpData parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.HttpData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.HttpData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.HttpData 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.storagetransfer.v1.proto.TransferTypes.HttpData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.HttpData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.HttpData parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.HttpData 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.storagetransfer.v1.proto.TransferTypes.HttpData parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.HttpData 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.storagetransfer.v1.proto.TransferTypes.HttpData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.HttpData 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.storagetransfer.v1.proto.TransferTypes.HttpData 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 HttpData resource specifies a list of objects on the web to be transferred
+     * over HTTP.  The information of the objects to be transferred is contained in
+     * a file referenced by a URL. The first line in the file must be
+     * `"TsvHttpData-1.0"`, which specifies the format of the file.  Subsequent
+     * lines specify the information of the list of objects, one object per list
+     * entry. Each entry has the following tab-delimited fields:
+     * * **HTTP URL** — The location of the object.
+     * * **Length** — The size of the object in bytes.
+     * * **MD5** — The base64-encoded MD5 hash of the object.
+     * For an example of a valid TSV file, see
+     * [Transferring data from
+     * URLs](https://cloud.google.com/storage-transfer/docs/create-url-list).
+     * When transferring data based on a URL list, keep the following in mind:
+     * * When an object located at `http(s)://hostname:port/<URL-path>` is
+     * transferred to a data sink, the name of the object at the data sink is
+     * `<hostname>/<URL-path>`.
+     * * If the specified size of an object does not match the actual size of the
+     * object fetched, the object will not be transferred.
+     * * If the specified MD5 does not match the MD5 computed from the transferred
+     * bytes, the object transfer will fail.
+     * * Ensure that each URL you specify is publicly accessible. For
+     * example, in Cloud Storage you can
+     * [share an object publicly]
+     * (/storage/docs/cloud-console#_sharingdata) and get a link to it.
+     * * Storage Transfer Service obeys `robots.txt` rules and requires the source
+     * HTTP server to support `Range` requests and to return a `Content-Length`
+     * header in each response.
+     * * [ObjectConditions][google.storagetransfer.v1.ObjectConditions] have no
+     * effect when filtering objects to transfer.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.HttpData} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.HttpData) + com.google.storagetransfer.v1.proto.TransferTypes.HttpDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_HttpData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_HttpData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.HttpData.class, + com.google.storagetransfer.v1.proto.TransferTypes.HttpData.Builder.class); + } + + // Construct using com.google.storagetransfer.v1.proto.TransferTypes.HttpData.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(); + listUrl_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_HttpData_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.HttpData + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.HttpData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.HttpData build() { + com.google.storagetransfer.v1.proto.TransferTypes.HttpData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.HttpData buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.HttpData result = + new com.google.storagetransfer.v1.proto.TransferTypes.HttpData(this); + result.listUrl_ = listUrl_; + 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.storagetransfer.v1.proto.TransferTypes.HttpData) { + return mergeFrom((com.google.storagetransfer.v1.proto.TransferTypes.HttpData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storagetransfer.v1.proto.TransferTypes.HttpData other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.HttpData.getDefaultInstance()) + return this; + if (!other.getListUrl().isEmpty()) { + listUrl_ = other.listUrl_; + 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.storagetransfer.v1.proto.TransferTypes.HttpData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.HttpData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object listUrl_ = ""; + /** + * + * + *
+       * Required. The URL that points to the file that stores the object list
+       * entries. This file must allow public access.  Currently, only URLs with
+       * HTTP and HTTPS schemes are supported.
+       * 
+ * + * string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The listUrl. + */ + public java.lang.String getListUrl() { + java.lang.Object ref = listUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + listUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The URL that points to the file that stores the object list
+       * entries. This file must allow public access.  Currently, only URLs with
+       * HTTP and HTTPS schemes are supported.
+       * 
+ * + * string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for listUrl. + */ + public com.google.protobuf.ByteString getListUrlBytes() { + java.lang.Object ref = listUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + listUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The URL that points to the file that stores the object list
+       * entries. This file must allow public access.  Currently, only URLs with
+       * HTTP and HTTPS schemes are supported.
+       * 
+ * + * string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The listUrl to set. + * @return This builder for chaining. + */ + public Builder setListUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + listUrl_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The URL that points to the file that stores the object list
+       * entries. This file must allow public access.  Currently, only URLs with
+       * HTTP and HTTPS schemes are supported.
+       * 
+ * + * string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearListUrl() { + + listUrl_ = getDefaultInstance().getListUrl(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The URL that points to the file that stores the object list
+       * entries. This file must allow public access.  Currently, only URLs with
+       * HTTP and HTTPS schemes are supported.
+       * 
+ * + * string list_url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for listUrl to set. + * @return This builder for chaining. + */ + public Builder setListUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + listUrl_ = 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.storagetransfer.v1.HttpData) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.HttpData) + private static final com.google.storagetransfer.v1.proto.TransferTypes.HttpData + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.HttpData(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.HttpData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public HttpData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new HttpData(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.storagetransfer.v1.proto.TransferTypes.HttpData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TransferOptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.TransferOptions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * When to overwrite objects that already exist in the sink. The default is
+     * that only objects that are different from the source are ovewritten. If
+     * true, all objects in the sink whose name matches an object in the source
+     * will be overwritten with the source object.
+     * 
+ * + * bool overwrite_objects_already_existing_in_sink = 1; + * + * @return The overwriteObjectsAlreadyExistingInSink. + */ + boolean getOverwriteObjectsAlreadyExistingInSink(); + + /** + * + * + *
+     * Whether objects that exist only in the sink should be deleted.
+     * **Note:** This option and [delete_objects_from_source_after_transfer]
+     * [google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer]
+     * are mutually exclusive.
+     * 
+ * + * bool delete_objects_unique_in_sink = 2; + * + * @return The deleteObjectsUniqueInSink. + */ + boolean getDeleteObjectsUniqueInSink(); + + /** + * + * + *
+     * Whether objects should be deleted from the source after they are
+     * transferred to the sink.
+     * **Note:** This option and [delete_objects_unique_in_sink]
+     * [google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+     * are mutually exclusive.
+     * 
+ * + * bool delete_objects_from_source_after_transfer = 3; + * + * @return The deleteObjectsFromSourceAfterTransfer. + */ + boolean getDeleteObjectsFromSourceAfterTransfer(); + } + /** + * + * + *
+   * TransferOptions define the actions to be performed on objects in a transfer.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.TransferOptions} + */ + public static final class TransferOptions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.TransferOptions) + TransferOptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransferOptions.newBuilder() to construct. + private TransferOptions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransferOptions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransferOptions(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransferOptions( + 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: + { + overwriteObjectsAlreadyExistingInSink_ = input.readBool(); + break; + } + case 16: + { + deleteObjectsUniqueInSink_ = input.readBool(); + break; + } + case 24: + { + deleteObjectsFromSourceAfterTransfer_ = 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.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.class, + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.Builder.class); + } + + public static final int OVERWRITE_OBJECTS_ALREADY_EXISTING_IN_SINK_FIELD_NUMBER = 1; + private boolean overwriteObjectsAlreadyExistingInSink_; + /** + * + * + *
+     * When to overwrite objects that already exist in the sink. The default is
+     * that only objects that are different from the source are ovewritten. If
+     * true, all objects in the sink whose name matches an object in the source
+     * will be overwritten with the source object.
+     * 
+ * + * bool overwrite_objects_already_existing_in_sink = 1; + * + * @return The overwriteObjectsAlreadyExistingInSink. + */ + @java.lang.Override + public boolean getOverwriteObjectsAlreadyExistingInSink() { + return overwriteObjectsAlreadyExistingInSink_; + } + + public static final int DELETE_OBJECTS_UNIQUE_IN_SINK_FIELD_NUMBER = 2; + private boolean deleteObjectsUniqueInSink_; + /** + * + * + *
+     * Whether objects that exist only in the sink should be deleted.
+     * **Note:** This option and [delete_objects_from_source_after_transfer]
+     * [google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer]
+     * are mutually exclusive.
+     * 
+ * + * bool delete_objects_unique_in_sink = 2; + * + * @return The deleteObjectsUniqueInSink. + */ + @java.lang.Override + public boolean getDeleteObjectsUniqueInSink() { + return deleteObjectsUniqueInSink_; + } + + public static final int DELETE_OBJECTS_FROM_SOURCE_AFTER_TRANSFER_FIELD_NUMBER = 3; + private boolean deleteObjectsFromSourceAfterTransfer_; + /** + * + * + *
+     * Whether objects should be deleted from the source after they are
+     * transferred to the sink.
+     * **Note:** This option and [delete_objects_unique_in_sink]
+     * [google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+     * are mutually exclusive.
+     * 
+ * + * bool delete_objects_from_source_after_transfer = 3; + * + * @return The deleteObjectsFromSourceAfterTransfer. + */ + @java.lang.Override + public boolean getDeleteObjectsFromSourceAfterTransfer() { + return deleteObjectsFromSourceAfterTransfer_; + } + + 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 (overwriteObjectsAlreadyExistingInSink_ != false) { + output.writeBool(1, overwriteObjectsAlreadyExistingInSink_); + } + if (deleteObjectsUniqueInSink_ != false) { + output.writeBool(2, deleteObjectsUniqueInSink_); + } + if (deleteObjectsFromSourceAfterTransfer_ != false) { + output.writeBool(3, deleteObjectsFromSourceAfterTransfer_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (overwriteObjectsAlreadyExistingInSink_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 1, overwriteObjectsAlreadyExistingInSink_); + } + if (deleteObjectsUniqueInSink_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(2, deleteObjectsUniqueInSink_); + } + if (deleteObjectsFromSourceAfterTransfer_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 3, deleteObjectsFromSourceAfterTransfer_); + } + 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.storagetransfer.v1.proto.TransferTypes.TransferOptions)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions other = + (com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions) obj; + + if (getOverwriteObjectsAlreadyExistingInSink() + != other.getOverwriteObjectsAlreadyExistingInSink()) return false; + if (getDeleteObjectsUniqueInSink() != other.getDeleteObjectsUniqueInSink()) return false; + if (getDeleteObjectsFromSourceAfterTransfer() + != other.getDeleteObjectsFromSourceAfterTransfer()) 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) + OVERWRITE_OBJECTS_ALREADY_EXISTING_IN_SINK_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean( + getOverwriteObjectsAlreadyExistingInSink()); + hash = (37 * hash) + DELETE_OBJECTS_UNIQUE_IN_SINK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDeleteObjectsUniqueInSink()); + hash = (37 * hash) + DELETE_OBJECTS_FROM_SOURCE_AFTER_TRANSFER_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getDeleteObjectsFromSourceAfterTransfer()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions 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.storagetransfer.v1.proto.TransferTypes.TransferOptions parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions 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.storagetransfer.v1.proto.TransferTypes.TransferOptions + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions + 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.storagetransfer.v1.proto.TransferTypes.TransferOptions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions 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.storagetransfer.v1.proto.TransferTypes.TransferOptions 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; + } + /** + * + * + *
+     * TransferOptions define the actions to be performed on objects in a transfer.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.TransferOptions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.TransferOptions) + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferOptions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferOptions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.class, + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.Builder.class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.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(); + overwriteObjectsAlreadyExistingInSink_ = false; + + deleteObjectsUniqueInSink_ = false; + + deleteObjectsFromSourceAfterTransfer_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferOptions_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions build() { + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions result = + new com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions(this); + result.overwriteObjectsAlreadyExistingInSink_ = overwriteObjectsAlreadyExistingInSink_; + result.deleteObjectsUniqueInSink_ = deleteObjectsUniqueInSink_; + result.deleteObjectsFromSourceAfterTransfer_ = deleteObjectsFromSourceAfterTransfer_; + 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.storagetransfer.v1.proto.TransferTypes.TransferOptions) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions + .getDefaultInstance()) return this; + if (other.getOverwriteObjectsAlreadyExistingInSink() != false) { + setOverwriteObjectsAlreadyExistingInSink( + other.getOverwriteObjectsAlreadyExistingInSink()); + } + if (other.getDeleteObjectsUniqueInSink() != false) { + setDeleteObjectsUniqueInSink(other.getDeleteObjectsUniqueInSink()); + } + if (other.getDeleteObjectsFromSourceAfterTransfer() != false) { + setDeleteObjectsFromSourceAfterTransfer(other.getDeleteObjectsFromSourceAfterTransfer()); + } + 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.storagetransfer.v1.proto.TransferTypes.TransferOptions parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean overwriteObjectsAlreadyExistingInSink_; + /** + * + * + *
+       * When to overwrite objects that already exist in the sink. The default is
+       * that only objects that are different from the source are ovewritten. If
+       * true, all objects in the sink whose name matches an object in the source
+       * will be overwritten with the source object.
+       * 
+ * + * bool overwrite_objects_already_existing_in_sink = 1; + * + * @return The overwriteObjectsAlreadyExistingInSink. + */ + @java.lang.Override + public boolean getOverwriteObjectsAlreadyExistingInSink() { + return overwriteObjectsAlreadyExistingInSink_; + } + /** + * + * + *
+       * When to overwrite objects that already exist in the sink. The default is
+       * that only objects that are different from the source are ovewritten. If
+       * true, all objects in the sink whose name matches an object in the source
+       * will be overwritten with the source object.
+       * 
+ * + * bool overwrite_objects_already_existing_in_sink = 1; + * + * @param value The overwriteObjectsAlreadyExistingInSink to set. + * @return This builder for chaining. + */ + public Builder setOverwriteObjectsAlreadyExistingInSink(boolean value) { + + overwriteObjectsAlreadyExistingInSink_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * When to overwrite objects that already exist in the sink. The default is
+       * that only objects that are different from the source are ovewritten. If
+       * true, all objects in the sink whose name matches an object in the source
+       * will be overwritten with the source object.
+       * 
+ * + * bool overwrite_objects_already_existing_in_sink = 1; + * + * @return This builder for chaining. + */ + public Builder clearOverwriteObjectsAlreadyExistingInSink() { + + overwriteObjectsAlreadyExistingInSink_ = false; + onChanged(); + return this; + } + + private boolean deleteObjectsUniqueInSink_; + /** + * + * + *
+       * Whether objects that exist only in the sink should be deleted.
+       * **Note:** This option and [delete_objects_from_source_after_transfer]
+       * [google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer]
+       * are mutually exclusive.
+       * 
+ * + * bool delete_objects_unique_in_sink = 2; + * + * @return The deleteObjectsUniqueInSink. + */ + @java.lang.Override + public boolean getDeleteObjectsUniqueInSink() { + return deleteObjectsUniqueInSink_; + } + /** + * + * + *
+       * Whether objects that exist only in the sink should be deleted.
+       * **Note:** This option and [delete_objects_from_source_after_transfer]
+       * [google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer]
+       * are mutually exclusive.
+       * 
+ * + * bool delete_objects_unique_in_sink = 2; + * + * @param value The deleteObjectsUniqueInSink to set. + * @return This builder for chaining. + */ + public Builder setDeleteObjectsUniqueInSink(boolean value) { + + deleteObjectsUniqueInSink_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether objects that exist only in the sink should be deleted.
+       * **Note:** This option and [delete_objects_from_source_after_transfer]
+       * [google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer]
+       * are mutually exclusive.
+       * 
+ * + * bool delete_objects_unique_in_sink = 2; + * + * @return This builder for chaining. + */ + public Builder clearDeleteObjectsUniqueInSink() { + + deleteObjectsUniqueInSink_ = false; + onChanged(); + return this; + } + + private boolean deleteObjectsFromSourceAfterTransfer_; + /** + * + * + *
+       * Whether objects should be deleted from the source after they are
+       * transferred to the sink.
+       * **Note:** This option and [delete_objects_unique_in_sink]
+       * [google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+       * are mutually exclusive.
+       * 
+ * + * bool delete_objects_from_source_after_transfer = 3; + * + * @return The deleteObjectsFromSourceAfterTransfer. + */ + @java.lang.Override + public boolean getDeleteObjectsFromSourceAfterTransfer() { + return deleteObjectsFromSourceAfterTransfer_; + } + /** + * + * + *
+       * Whether objects should be deleted from the source after they are
+       * transferred to the sink.
+       * **Note:** This option and [delete_objects_unique_in_sink]
+       * [google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+       * are mutually exclusive.
+       * 
+ * + * bool delete_objects_from_source_after_transfer = 3; + * + * @param value The deleteObjectsFromSourceAfterTransfer to set. + * @return This builder for chaining. + */ + public Builder setDeleteObjectsFromSourceAfterTransfer(boolean value) { + + deleteObjectsFromSourceAfterTransfer_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Whether objects should be deleted from the source after they are
+       * transferred to the sink.
+       * **Note:** This option and [delete_objects_unique_in_sink]
+       * [google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+       * are mutually exclusive.
+       * 
+ * + * bool delete_objects_from_source_after_transfer = 3; + * + * @return This builder for chaining. + */ + public Builder clearDeleteObjectsFromSourceAfterTransfer() { + + deleteObjectsFromSourceAfterTransfer_ = 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.storagetransfer.v1.TransferOptions) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.TransferOptions) + private static final com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransferOptions parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransferOptions(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.storagetransfer.v1.proto.TransferTypes.TransferOptions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TransferSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.TransferSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A Cloud Storage data sink.
+     * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + * + * @return Whether the gcsDataSink field is set. + */ + boolean hasGcsDataSink(); + /** + * + * + *
+     * A Cloud Storage data sink.
+     * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + * + * @return The gcsDataSink. + */ + com.google.storagetransfer.v1.proto.TransferTypes.GcsData getGcsDataSink(); + /** + * + * + *
+     * A Cloud Storage data sink.
+     * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + */ + com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder getGcsDataSinkOrBuilder(); + + /** + * + * + *
+     * A Cloud Storage data source.
+     * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + * + * @return Whether the gcsDataSource field is set. + */ + boolean hasGcsDataSource(); + /** + * + * + *
+     * A Cloud Storage data source.
+     * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + * + * @return The gcsDataSource. + */ + com.google.storagetransfer.v1.proto.TransferTypes.GcsData getGcsDataSource(); + /** + * + * + *
+     * A Cloud Storage data source.
+     * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + */ + com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder getGcsDataSourceOrBuilder(); + + /** + * + * + *
+     * An AWS S3 data source.
+     * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + * + * @return Whether the awsS3DataSource field is set. + */ + boolean hasAwsS3DataSource(); + /** + * + * + *
+     * An AWS S3 data source.
+     * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + * + * @return The awsS3DataSource. + */ + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data getAwsS3DataSource(); + /** + * + * + *
+     * An AWS S3 data source.
+     * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + */ + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3DataOrBuilder + getAwsS3DataSourceOrBuilder(); + + /** + * + * + *
+     * An HTTP URL data source.
+     * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + * + * @return Whether the httpDataSource field is set. + */ + boolean hasHttpDataSource(); + /** + * + * + *
+     * An HTTP URL data source.
+     * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + * + * @return The httpDataSource. + */ + com.google.storagetransfer.v1.proto.TransferTypes.HttpData getHttpDataSource(); + /** + * + * + *
+     * An HTTP URL data source.
+     * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + */ + com.google.storagetransfer.v1.proto.TransferTypes.HttpDataOrBuilder + getHttpDataSourceOrBuilder(); + + /** + * + * + *
+     * An Azure Blob Storage data source.
+     * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + * + * @return Whether the azureBlobStorageDataSource field is set. + */ + boolean hasAzureBlobStorageDataSource(); + /** + * + * + *
+     * An Azure Blob Storage data source.
+     * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + * + * @return The azureBlobStorageDataSource. + */ + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + getAzureBlobStorageDataSource(); + /** + * + * + *
+     * An Azure Blob Storage data source.
+     * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + */ + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageDataOrBuilder + getAzureBlobStorageDataSourceOrBuilder(); + + /** + * + * + *
+     * Only objects that satisfy these object conditions are included in the set
+     * of data source and data sink objects.  Object conditions based on
+     * objects' "last modification time" do not exclude objects in a data sink.
+     * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + * + * @return Whether the objectConditions field is set. + */ + boolean hasObjectConditions(); + /** + * + * + *
+     * Only objects that satisfy these object conditions are included in the set
+     * of data source and data sink objects.  Object conditions based on
+     * objects' "last modification time" do not exclude objects in a data sink.
+     * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + * + * @return The objectConditions. + */ + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions getObjectConditions(); + /** + * + * + *
+     * Only objects that satisfy these object conditions are included in the set
+     * of data source and data sink objects.  Object conditions based on
+     * objects' "last modification time" do not exclude objects in a data sink.
+     * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + */ + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditionsOrBuilder + getObjectConditionsOrBuilder(); + + /** + * + * + *
+     * If the option
+     * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+     * is `true` and time-based object conditions such as 'last modification time'
+     * are specified, the request fails with an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + * + * @return Whether the transferOptions field is set. + */ + boolean hasTransferOptions(); + /** + * + * + *
+     * If the option
+     * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+     * is `true` and time-based object conditions such as 'last modification time'
+     * are specified, the request fails with an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + * + * @return The transferOptions. + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions getTransferOptions(); + /** + * + * + *
+     * If the option
+     * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+     * is `true` and time-based object conditions such as 'last modification time'
+     * are specified, the request fails with an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptionsOrBuilder + getTransferOptionsOrBuilder(); + + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.DataSinkCase + getDataSinkCase(); + + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.DataSourceCase + getDataSourceCase(); + } + /** + * + * + *
+   * Configuration for running a transfer.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.TransferSpec} + */ + public static final class TransferSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.TransferSpec) + TransferSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransferSpec.newBuilder() to construct. + private TransferSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransferSpec() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransferSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransferSpec( + 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.storagetransfer.v1.proto.TransferTypes.GcsData.Builder subBuilder = null; + if (dataSourceCase_ == 1) { + subBuilder = + ((com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSource_) + .toBuilder(); + } + dataSource_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSource_); + dataSource_ = subBuilder.buildPartial(); + } + dataSourceCase_ = 1; + break; + } + case 18: + { + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.Builder subBuilder = + null; + if (dataSourceCase_ == 2) { + subBuilder = + ((com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) dataSource_) + .toBuilder(); + } + dataSource_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) dataSource_); + dataSource_ = subBuilder.buildPartial(); + } + dataSourceCase_ = 2; + break; + } + case 26: + { + com.google.storagetransfer.v1.proto.TransferTypes.HttpData.Builder subBuilder = + null; + if (dataSourceCase_ == 3) { + subBuilder = + ((com.google.storagetransfer.v1.proto.TransferTypes.HttpData) dataSource_) + .toBuilder(); + } + dataSource_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.HttpData.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.HttpData) dataSource_); + dataSource_ = subBuilder.buildPartial(); + } + dataSourceCase_ = 3; + break; + } + case 34: + { + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder subBuilder = null; + if (dataSinkCase_ == 4) { + subBuilder = + ((com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSink_) + .toBuilder(); + } + dataSink_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSink_); + dataSink_ = subBuilder.buildPartial(); + } + dataSinkCase_ = 4; + break; + } + case 42: + { + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.Builder + subBuilder = null; + if (objectConditions_ != null) { + subBuilder = objectConditions_.toBuilder(); + } + objectConditions_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(objectConditions_); + objectConditions_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.Builder + subBuilder = null; + if (transferOptions_ != null) { + subBuilder = transferOptions_.toBuilder(); + } + transferOptions_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transferOptions_); + transferOptions_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData.Builder + subBuilder = null; + if (dataSourceCase_ == 8) { + subBuilder = + ((com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) + dataSource_) + .toBuilder(); + } + dataSource_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) + dataSource_); + dataSource_ = subBuilder.buildPartial(); + } + dataSourceCase_ = 8; + 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.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.class, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder.class); + } + + private int dataSinkCase_ = 0; + private java.lang.Object dataSink_; + + public enum DataSinkCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DATA_SINK(4), + DATASINK_NOT_SET(0); + private final int value; + + private DataSinkCase(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 DataSinkCase valueOf(int value) { + return forNumber(value); + } + + public static DataSinkCase forNumber(int value) { + switch (value) { + case 4: + return GCS_DATA_SINK; + case 0: + return DATASINK_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataSinkCase getDataSinkCase() { + return DataSinkCase.forNumber(dataSinkCase_); + } + + private int dataSourceCase_ = 0; + private java.lang.Object dataSource_; + + public enum DataSourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DATA_SOURCE(1), + AWS_S3_DATA_SOURCE(2), + HTTP_DATA_SOURCE(3), + AZURE_BLOB_STORAGE_DATA_SOURCE(8), + DATASOURCE_NOT_SET(0); + private final int value; + + private DataSourceCase(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 DataSourceCase valueOf(int value) { + return forNumber(value); + } + + public static DataSourceCase forNumber(int value) { + switch (value) { + case 1: + return GCS_DATA_SOURCE; + case 2: + return AWS_S3_DATA_SOURCE; + case 3: + return HTTP_DATA_SOURCE; + case 8: + return AZURE_BLOB_STORAGE_DATA_SOURCE; + case 0: + return DATASOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DataSourceCase getDataSourceCase() { + return DataSourceCase.forNumber(dataSourceCase_); + } + + public static final int GCS_DATA_SINK_FIELD_NUMBER = 4; + /** + * + * + *
+     * A Cloud Storage data sink.
+     * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + * + * @return Whether the gcsDataSink field is set. + */ + @java.lang.Override + public boolean hasGcsDataSink() { + return dataSinkCase_ == 4; + } + /** + * + * + *
+     * A Cloud Storage data sink.
+     * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + * + * @return The gcsDataSink. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GcsData getGcsDataSink() { + if (dataSinkCase_ == 4) { + return (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSink_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } + /** + * + * + *
+     * A Cloud Storage data sink.
+     * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder + getGcsDataSinkOrBuilder() { + if (dataSinkCase_ == 4) { + return (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSink_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } + + public static final int GCS_DATA_SOURCE_FIELD_NUMBER = 1; + /** + * + * + *
+     * A Cloud Storage data source.
+     * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + * + * @return Whether the gcsDataSource field is set. + */ + @java.lang.Override + public boolean hasGcsDataSource() { + return dataSourceCase_ == 1; + } + /** + * + * + *
+     * A Cloud Storage data source.
+     * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + * + * @return The gcsDataSource. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GcsData getGcsDataSource() { + if (dataSourceCase_ == 1) { + return (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } + /** + * + * + *
+     * A Cloud Storage data source.
+     * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder + getGcsDataSourceOrBuilder() { + if (dataSourceCase_ == 1) { + return (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } + + public static final int AWS_S3_DATA_SOURCE_FIELD_NUMBER = 2; + /** + * + * + *
+     * An AWS S3 data source.
+     * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + * + * @return Whether the awsS3DataSource field is set. + */ + @java.lang.Override + public boolean hasAwsS3DataSource() { + return dataSourceCase_ == 2; + } + /** + * + * + *
+     * An AWS S3 data source.
+     * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + * + * @return The awsS3DataSource. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data getAwsS3DataSource() { + if (dataSourceCase_ == 2) { + return (com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.getDefaultInstance(); + } + /** + * + * + *
+     * An AWS S3 data source.
+     * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AwsS3DataOrBuilder + getAwsS3DataSourceOrBuilder() { + if (dataSourceCase_ == 2) { + return (com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.getDefaultInstance(); + } + + public static final int HTTP_DATA_SOURCE_FIELD_NUMBER = 3; + /** + * + * + *
+     * An HTTP URL data source.
+     * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + * + * @return Whether the httpDataSource field is set. + */ + @java.lang.Override + public boolean hasHttpDataSource() { + return dataSourceCase_ == 3; + } + /** + * + * + *
+     * An HTTP URL data source.
+     * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + * + * @return The httpDataSource. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.HttpData getHttpDataSource() { + if (dataSourceCase_ == 3) { + return (com.google.storagetransfer.v1.proto.TransferTypes.HttpData) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.HttpData.getDefaultInstance(); + } + /** + * + * + *
+     * An HTTP URL data source.
+     * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.HttpDataOrBuilder + getHttpDataSourceOrBuilder() { + if (dataSourceCase_ == 3) { + return (com.google.storagetransfer.v1.proto.TransferTypes.HttpData) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.HttpData.getDefaultInstance(); + } + + public static final int AZURE_BLOB_STORAGE_DATA_SOURCE_FIELD_NUMBER = 8; + /** + * + * + *
+     * An Azure Blob Storage data source.
+     * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + * + * @return Whether the azureBlobStorageDataSource field is set. + */ + @java.lang.Override + public boolean hasAzureBlobStorageDataSource() { + return dataSourceCase_ == 8; + } + /** + * + * + *
+     * An Azure Blob Storage data source.
+     * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + * + * @return The azureBlobStorageDataSource. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + getAzureBlobStorageDataSource() { + if (dataSourceCase_ == 8) { + return (com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + .getDefaultInstance(); + } + /** + * + * + *
+     * An Azure Blob Storage data source.
+     * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageDataOrBuilder + getAzureBlobStorageDataSourceOrBuilder() { + if (dataSourceCase_ == 8) { + return (com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + .getDefaultInstance(); + } + + public static final int OBJECT_CONDITIONS_FIELD_NUMBER = 5; + private com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions objectConditions_; + /** + * + * + *
+     * Only objects that satisfy these object conditions are included in the set
+     * of data source and data sink objects.  Object conditions based on
+     * objects' "last modification time" do not exclude objects in a data sink.
+     * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + * + * @return Whether the objectConditions field is set. + */ + @java.lang.Override + public boolean hasObjectConditions() { + return objectConditions_ != null; + } + /** + * + * + *
+     * Only objects that satisfy these object conditions are included in the set
+     * of data source and data sink objects.  Object conditions based on
+     * objects' "last modification time" do not exclude objects in a data sink.
+     * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + * + * @return The objectConditions. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions + getObjectConditions() { + return objectConditions_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.getDefaultInstance() + : objectConditions_; + } + /** + * + * + *
+     * Only objects that satisfy these object conditions are included in the set
+     * of data source and data sink objects.  Object conditions based on
+     * objects' "last modification time" do not exclude objects in a data sink.
+     * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditionsOrBuilder + getObjectConditionsOrBuilder() { + return getObjectConditions(); + } + + public static final int TRANSFER_OPTIONS_FIELD_NUMBER = 6; + private com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions transferOptions_; + /** + * + * + *
+     * If the option
+     * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+     * is `true` and time-based object conditions such as 'last modification time'
+     * are specified, the request fails with an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + * + * @return Whether the transferOptions field is set. + */ + @java.lang.Override + public boolean hasTransferOptions() { + return transferOptions_ != null; + } + /** + * + * + *
+     * If the option
+     * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+     * is `true` and time-based object conditions such as 'last modification time'
+     * are specified, the request fails with an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + * + * @return The transferOptions. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions getTransferOptions() { + return transferOptions_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.getDefaultInstance() + : transferOptions_; + } + /** + * + * + *
+     * If the option
+     * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+     * is `true` and time-based object conditions such as 'last modification time'
+     * are specified, the request fails with an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOptionsOrBuilder + getTransferOptionsOrBuilder() { + return getTransferOptions(); + } + + 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 (dataSourceCase_ == 1) { + output.writeMessage( + 1, (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSource_); + } + if (dataSourceCase_ == 2) { + output.writeMessage( + 2, (com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) dataSource_); + } + if (dataSourceCase_ == 3) { + output.writeMessage( + 3, (com.google.storagetransfer.v1.proto.TransferTypes.HttpData) dataSource_); + } + if (dataSinkCase_ == 4) { + output.writeMessage( + 4, (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSink_); + } + if (objectConditions_ != null) { + output.writeMessage(5, getObjectConditions()); + } + if (transferOptions_ != null) { + output.writeMessage(6, getTransferOptions()); + } + if (dataSourceCase_ == 8) { + output.writeMessage( + 8, + (com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) dataSource_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (dataSourceCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSource_); + } + if (dataSourceCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) dataSource_); + } + if (dataSourceCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.storagetransfer.v1.proto.TransferTypes.HttpData) dataSource_); + } + if (dataSinkCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSink_); + } + if (objectConditions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getObjectConditions()); + } + if (transferOptions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTransferOptions()); + } + if (dataSourceCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, + (com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) + dataSource_); + } + 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.storagetransfer.v1.proto.TransferTypes.TransferSpec)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec other = + (com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec) obj; + + if (hasObjectConditions() != other.hasObjectConditions()) return false; + if (hasObjectConditions()) { + if (!getObjectConditions().equals(other.getObjectConditions())) return false; + } + if (hasTransferOptions() != other.hasTransferOptions()) return false; + if (hasTransferOptions()) { + if (!getTransferOptions().equals(other.getTransferOptions())) return false; + } + if (!getDataSinkCase().equals(other.getDataSinkCase())) return false; + switch (dataSinkCase_) { + case 4: + if (!getGcsDataSink().equals(other.getGcsDataSink())) return false; + break; + case 0: + default: + } + if (!getDataSourceCase().equals(other.getDataSourceCase())) return false; + switch (dataSourceCase_) { + case 1: + if (!getGcsDataSource().equals(other.getGcsDataSource())) return false; + break; + case 2: + if (!getAwsS3DataSource().equals(other.getAwsS3DataSource())) return false; + break; + case 3: + if (!getHttpDataSource().equals(other.getHttpDataSource())) return false; + break; + case 8: + if (!getAzureBlobStorageDataSource().equals(other.getAzureBlobStorageDataSource())) + 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 (hasObjectConditions()) { + hash = (37 * hash) + OBJECT_CONDITIONS_FIELD_NUMBER; + hash = (53 * hash) + getObjectConditions().hashCode(); + } + if (hasTransferOptions()) { + hash = (37 * hash) + TRANSFER_OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getTransferOptions().hashCode(); + } + switch (dataSinkCase_) { + case 4: + hash = (37 * hash) + GCS_DATA_SINK_FIELD_NUMBER; + hash = (53 * hash) + getGcsDataSink().hashCode(); + break; + case 0: + default: + } + switch (dataSourceCase_) { + case 1: + hash = (37 * hash) + GCS_DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getGcsDataSource().hashCode(); + break; + case 2: + hash = (37 * hash) + AWS_S3_DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getAwsS3DataSource().hashCode(); + break; + case 3: + hash = (37 * hash) + HTTP_DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getHttpDataSource().hashCode(); + break; + case 8: + hash = (37 * hash) + AZURE_BLOB_STORAGE_DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getAzureBlobStorageDataSource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec 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.storagetransfer.v1.proto.TransferTypes.TransferSpec parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec 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.storagetransfer.v1.proto.TransferTypes.TransferSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec 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.storagetransfer.v1.proto.TransferTypes.TransferSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec 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.storagetransfer.v1.proto.TransferTypes.TransferSpec 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 running a transfer.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.TransferSpec} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.TransferSpec) + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.class, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder.class); + } + + // Construct using com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.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 (objectConditionsBuilder_ == null) { + objectConditions_ = null; + } else { + objectConditions_ = null; + objectConditionsBuilder_ = null; + } + if (transferOptionsBuilder_ == null) { + transferOptions_ = null; + } else { + transferOptions_ = null; + transferOptionsBuilder_ = null; + } + dataSinkCase_ = 0; + dataSink_ = null; + dataSourceCase_ = 0; + dataSource_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferSpec_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec build() { + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec result = + new com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec(this); + if (dataSinkCase_ == 4) { + if (gcsDataSinkBuilder_ == null) { + result.dataSink_ = dataSink_; + } else { + result.dataSink_ = gcsDataSinkBuilder_.build(); + } + } + if (dataSourceCase_ == 1) { + if (gcsDataSourceBuilder_ == null) { + result.dataSource_ = dataSource_; + } else { + result.dataSource_ = gcsDataSourceBuilder_.build(); + } + } + if (dataSourceCase_ == 2) { + if (awsS3DataSourceBuilder_ == null) { + result.dataSource_ = dataSource_; + } else { + result.dataSource_ = awsS3DataSourceBuilder_.build(); + } + } + if (dataSourceCase_ == 3) { + if (httpDataSourceBuilder_ == null) { + result.dataSource_ = dataSource_; + } else { + result.dataSource_ = httpDataSourceBuilder_.build(); + } + } + if (dataSourceCase_ == 8) { + if (azureBlobStorageDataSourceBuilder_ == null) { + result.dataSource_ = dataSource_; + } else { + result.dataSource_ = azureBlobStorageDataSourceBuilder_.build(); + } + } + if (objectConditionsBuilder_ == null) { + result.objectConditions_ = objectConditions_; + } else { + result.objectConditions_ = objectConditionsBuilder_.build(); + } + if (transferOptionsBuilder_ == null) { + result.transferOptions_ = transferOptions_; + } else { + result.transferOptions_ = transferOptionsBuilder_.build(); + } + result.dataSinkCase_ = dataSinkCase_; + result.dataSourceCase_ = dataSourceCase_; + 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.storagetransfer.v1.proto.TransferTypes.TransferSpec) { + return mergeFrom((com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.getDefaultInstance()) + return this; + if (other.hasObjectConditions()) { + mergeObjectConditions(other.getObjectConditions()); + } + if (other.hasTransferOptions()) { + mergeTransferOptions(other.getTransferOptions()); + } + switch (other.getDataSinkCase()) { + case GCS_DATA_SINK: + { + mergeGcsDataSink(other.getGcsDataSink()); + break; + } + case DATASINK_NOT_SET: + { + break; + } + } + switch (other.getDataSourceCase()) { + case GCS_DATA_SOURCE: + { + mergeGcsDataSource(other.getGcsDataSource()); + break; + } + case AWS_S3_DATA_SOURCE: + { + mergeAwsS3DataSource(other.getAwsS3DataSource()); + break; + } + case HTTP_DATA_SOURCE: + { + mergeHttpDataSource(other.getHttpDataSource()); + break; + } + case AZURE_BLOB_STORAGE_DATA_SOURCE: + { + mergeAzureBlobStorageDataSource(other.getAzureBlobStorageDataSource()); + break; + } + case DATASOURCE_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.storagetransfer.v1.proto.TransferTypes.TransferSpec parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int dataSinkCase_ = 0; + private java.lang.Object dataSink_; + + public DataSinkCase getDataSinkCase() { + return DataSinkCase.forNumber(dataSinkCase_); + } + + public Builder clearDataSink() { + dataSinkCase_ = 0; + dataSink_ = null; + onChanged(); + return this; + } + + private int dataSourceCase_ = 0; + private java.lang.Object dataSource_; + + public DataSourceCase getDataSourceCase() { + return DataSourceCase.forNumber(dataSourceCase_); + } + + public Builder clearDataSource() { + dataSourceCase_ = 0; + dataSource_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.GcsData, + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder> + gcsDataSinkBuilder_; + /** + * + * + *
+       * A Cloud Storage data sink.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + * + * @return Whether the gcsDataSink field is set. + */ + @java.lang.Override + public boolean hasGcsDataSink() { + return dataSinkCase_ == 4; + } + /** + * + * + *
+       * A Cloud Storage data sink.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + * + * @return The gcsDataSink. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GcsData getGcsDataSink() { + if (gcsDataSinkBuilder_ == null) { + if (dataSinkCase_ == 4) { + return (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSink_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } else { + if (dataSinkCase_ == 4) { + return gcsDataSinkBuilder_.getMessage(); + } + return com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } + } + /** + * + * + *
+       * A Cloud Storage data sink.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + */ + public Builder setGcsDataSink( + com.google.storagetransfer.v1.proto.TransferTypes.GcsData value) { + if (gcsDataSinkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSink_ = value; + onChanged(); + } else { + gcsDataSinkBuilder_.setMessage(value); + } + dataSinkCase_ = 4; + return this; + } + /** + * + * + *
+       * A Cloud Storage data sink.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + */ + public Builder setGcsDataSink( + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder builderForValue) { + if (gcsDataSinkBuilder_ == null) { + dataSink_ = builderForValue.build(); + onChanged(); + } else { + gcsDataSinkBuilder_.setMessage(builderForValue.build()); + } + dataSinkCase_ = 4; + return this; + } + /** + * + * + *
+       * A Cloud Storage data sink.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + */ + public Builder mergeGcsDataSink( + com.google.storagetransfer.v1.proto.TransferTypes.GcsData value) { + if (gcsDataSinkBuilder_ == null) { + if (dataSinkCase_ == 4 + && dataSink_ + != com.google.storagetransfer.v1.proto.TransferTypes.GcsData + .getDefaultInstance()) { + dataSink_ = + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.newBuilder( + (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSink_) + .mergeFrom(value) + .buildPartial(); + } else { + dataSink_ = value; + } + onChanged(); + } else { + if (dataSinkCase_ == 4) { + gcsDataSinkBuilder_.mergeFrom(value); + } + gcsDataSinkBuilder_.setMessage(value); + } + dataSinkCase_ = 4; + return this; + } + /** + * + * + *
+       * A Cloud Storage data sink.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + */ + public Builder clearGcsDataSink() { + if (gcsDataSinkBuilder_ == null) { + if (dataSinkCase_ == 4) { + dataSinkCase_ = 0; + dataSink_ = null; + onChanged(); + } + } else { + if (dataSinkCase_ == 4) { + dataSinkCase_ = 0; + dataSink_ = null; + } + gcsDataSinkBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A Cloud Storage data sink.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder + getGcsDataSinkBuilder() { + return getGcsDataSinkFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A Cloud Storage data sink.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder + getGcsDataSinkOrBuilder() { + if ((dataSinkCase_ == 4) && (gcsDataSinkBuilder_ != null)) { + return gcsDataSinkBuilder_.getMessageOrBuilder(); + } else { + if (dataSinkCase_ == 4) { + return (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSink_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } + } + /** + * + * + *
+       * A Cloud Storage data sink.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_sink = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.GcsData, + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder> + getGcsDataSinkFieldBuilder() { + if (gcsDataSinkBuilder_ == null) { + if (!(dataSinkCase_ == 4)) { + dataSink_ = + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } + gcsDataSinkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.GcsData, + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder>( + (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSink_, + getParentForChildren(), + isClean()); + dataSink_ = null; + } + dataSinkCase_ = 4; + onChanged(); + ; + return gcsDataSinkBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.GcsData, + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder> + gcsDataSourceBuilder_; + /** + * + * + *
+       * A Cloud Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + * + * @return Whether the gcsDataSource field is set. + */ + @java.lang.Override + public boolean hasGcsDataSource() { + return dataSourceCase_ == 1; + } + /** + * + * + *
+       * A Cloud Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + * + * @return The gcsDataSource. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GcsData getGcsDataSource() { + if (gcsDataSourceBuilder_ == null) { + if (dataSourceCase_ == 1) { + return (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } else { + if (dataSourceCase_ == 1) { + return gcsDataSourceBuilder_.getMessage(); + } + return com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } + } + /** + * + * + *
+       * A Cloud Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + */ + public Builder setGcsDataSource( + com.google.storagetransfer.v1.proto.TransferTypes.GcsData value) { + if (gcsDataSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + onChanged(); + } else { + gcsDataSourceBuilder_.setMessage(value); + } + dataSourceCase_ = 1; + return this; + } + /** + * + * + *
+       * A Cloud Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + */ + public Builder setGcsDataSource( + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder builderForValue) { + if (gcsDataSourceBuilder_ == null) { + dataSource_ = builderForValue.build(); + onChanged(); + } else { + gcsDataSourceBuilder_.setMessage(builderForValue.build()); + } + dataSourceCase_ = 1; + return this; + } + /** + * + * + *
+       * A Cloud Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + */ + public Builder mergeGcsDataSource( + com.google.storagetransfer.v1.proto.TransferTypes.GcsData value) { + if (gcsDataSourceBuilder_ == null) { + if (dataSourceCase_ == 1 + && dataSource_ + != com.google.storagetransfer.v1.proto.TransferTypes.GcsData + .getDefaultInstance()) { + dataSource_ = + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.newBuilder( + (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSource_) + .mergeFrom(value) + .buildPartial(); + } else { + dataSource_ = value; + } + onChanged(); + } else { + if (dataSourceCase_ == 1) { + gcsDataSourceBuilder_.mergeFrom(value); + } + gcsDataSourceBuilder_.setMessage(value); + } + dataSourceCase_ = 1; + return this; + } + /** + * + * + *
+       * A Cloud Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + */ + public Builder clearGcsDataSource() { + if (gcsDataSourceBuilder_ == null) { + if (dataSourceCase_ == 1) { + dataSourceCase_ = 0; + dataSource_ = null; + onChanged(); + } + } else { + if (dataSourceCase_ == 1) { + dataSourceCase_ = 0; + dataSource_ = null; + } + gcsDataSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A Cloud Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder + getGcsDataSourceBuilder() { + return getGcsDataSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A Cloud Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder + getGcsDataSourceOrBuilder() { + if ((dataSourceCase_ == 1) && (gcsDataSourceBuilder_ != null)) { + return gcsDataSourceBuilder_.getMessageOrBuilder(); + } else { + if (dataSourceCase_ == 1) { + return (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } + } + /** + * + * + *
+       * A Cloud Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.GcsData gcs_data_source = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.GcsData, + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder> + getGcsDataSourceFieldBuilder() { + if (gcsDataSourceBuilder_ == null) { + if (!(dataSourceCase_ == 1)) { + dataSource_ = + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.getDefaultInstance(); + } + gcsDataSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.GcsData, + com.google.storagetransfer.v1.proto.TransferTypes.GcsData.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.GcsDataOrBuilder>( + (com.google.storagetransfer.v1.proto.TransferTypes.GcsData) dataSource_, + getParentForChildren(), + isClean()); + dataSource_ = null; + } + dataSourceCase_ = 1; + onChanged(); + ; + return gcsDataSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data, + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3DataOrBuilder> + awsS3DataSourceBuilder_; + /** + * + * + *
+       * An AWS S3 data source.
+       * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + * + * @return Whether the awsS3DataSource field is set. + */ + @java.lang.Override + public boolean hasAwsS3DataSource() { + return dataSourceCase_ == 2; + } + /** + * + * + *
+       * An AWS S3 data source.
+       * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + * + * @return The awsS3DataSource. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data getAwsS3DataSource() { + if (awsS3DataSourceBuilder_ == null) { + if (dataSourceCase_ == 2) { + return (com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.getDefaultInstance(); + } else { + if (dataSourceCase_ == 2) { + return awsS3DataSourceBuilder_.getMessage(); + } + return com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.getDefaultInstance(); + } + } + /** + * + * + *
+       * An AWS S3 data source.
+       * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + */ + public Builder setAwsS3DataSource( + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data value) { + if (awsS3DataSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + onChanged(); + } else { + awsS3DataSourceBuilder_.setMessage(value); + } + dataSourceCase_ = 2; + return this; + } + /** + * + * + *
+       * An AWS S3 data source.
+       * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + */ + public Builder setAwsS3DataSource( + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.Builder builderForValue) { + if (awsS3DataSourceBuilder_ == null) { + dataSource_ = builderForValue.build(); + onChanged(); + } else { + awsS3DataSourceBuilder_.setMessage(builderForValue.build()); + } + dataSourceCase_ = 2; + return this; + } + /** + * + * + *
+       * An AWS S3 data source.
+       * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + */ + public Builder mergeAwsS3DataSource( + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data value) { + if (awsS3DataSourceBuilder_ == null) { + if (dataSourceCase_ == 2 + && dataSource_ + != com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data + .getDefaultInstance()) { + dataSource_ = + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.newBuilder( + (com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) dataSource_) + .mergeFrom(value) + .buildPartial(); + } else { + dataSource_ = value; + } + onChanged(); + } else { + if (dataSourceCase_ == 2) { + awsS3DataSourceBuilder_.mergeFrom(value); + } + awsS3DataSourceBuilder_.setMessage(value); + } + dataSourceCase_ = 2; + return this; + } + /** + * + * + *
+       * An AWS S3 data source.
+       * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + */ + public Builder clearAwsS3DataSource() { + if (awsS3DataSourceBuilder_ == null) { + if (dataSourceCase_ == 2) { + dataSourceCase_ = 0; + dataSource_ = null; + onChanged(); + } + } else { + if (dataSourceCase_ == 2) { + dataSourceCase_ = 0; + dataSource_ = null; + } + awsS3DataSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * An AWS S3 data source.
+       * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.Builder + getAwsS3DataSourceBuilder() { + return getAwsS3DataSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * An AWS S3 data source.
+       * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AwsS3DataOrBuilder + getAwsS3DataSourceOrBuilder() { + if ((dataSourceCase_ == 2) && (awsS3DataSourceBuilder_ != null)) { + return awsS3DataSourceBuilder_.getMessageOrBuilder(); + } else { + if (dataSourceCase_ == 2) { + return (com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.getDefaultInstance(); + } + } + /** + * + * + *
+       * An AWS S3 data source.
+       * 
+ * + * .google.storagetransfer.v1.AwsS3Data aws_s3_data_source = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data, + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3DataOrBuilder> + getAwsS3DataSourceFieldBuilder() { + if (awsS3DataSourceBuilder_ == null) { + if (!(dataSourceCase_ == 2)) { + dataSource_ = + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.getDefaultInstance(); + } + awsS3DataSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data, + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.AwsS3DataOrBuilder>( + (com.google.storagetransfer.v1.proto.TransferTypes.AwsS3Data) dataSource_, + getParentForChildren(), + isClean()); + dataSource_ = null; + } + dataSourceCase_ = 2; + onChanged(); + ; + return awsS3DataSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.HttpData, + com.google.storagetransfer.v1.proto.TransferTypes.HttpData.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.HttpDataOrBuilder> + httpDataSourceBuilder_; + /** + * + * + *
+       * An HTTP URL data source.
+       * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + * + * @return Whether the httpDataSource field is set. + */ + @java.lang.Override + public boolean hasHttpDataSource() { + return dataSourceCase_ == 3; + } + /** + * + * + *
+       * An HTTP URL data source.
+       * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + * + * @return The httpDataSource. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.HttpData getHttpDataSource() { + if (httpDataSourceBuilder_ == null) { + if (dataSourceCase_ == 3) { + return (com.google.storagetransfer.v1.proto.TransferTypes.HttpData) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.HttpData.getDefaultInstance(); + } else { + if (dataSourceCase_ == 3) { + return httpDataSourceBuilder_.getMessage(); + } + return com.google.storagetransfer.v1.proto.TransferTypes.HttpData.getDefaultInstance(); + } + } + /** + * + * + *
+       * An HTTP URL data source.
+       * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + */ + public Builder setHttpDataSource( + com.google.storagetransfer.v1.proto.TransferTypes.HttpData value) { + if (httpDataSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + onChanged(); + } else { + httpDataSourceBuilder_.setMessage(value); + } + dataSourceCase_ = 3; + return this; + } + /** + * + * + *
+       * An HTTP URL data source.
+       * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + */ + public Builder setHttpDataSource( + com.google.storagetransfer.v1.proto.TransferTypes.HttpData.Builder builderForValue) { + if (httpDataSourceBuilder_ == null) { + dataSource_ = builderForValue.build(); + onChanged(); + } else { + httpDataSourceBuilder_.setMessage(builderForValue.build()); + } + dataSourceCase_ = 3; + return this; + } + /** + * + * + *
+       * An HTTP URL data source.
+       * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + */ + public Builder mergeHttpDataSource( + com.google.storagetransfer.v1.proto.TransferTypes.HttpData value) { + if (httpDataSourceBuilder_ == null) { + if (dataSourceCase_ == 3 + && dataSource_ + != com.google.storagetransfer.v1.proto.TransferTypes.HttpData + .getDefaultInstance()) { + dataSource_ = + com.google.storagetransfer.v1.proto.TransferTypes.HttpData.newBuilder( + (com.google.storagetransfer.v1.proto.TransferTypes.HttpData) dataSource_) + .mergeFrom(value) + .buildPartial(); + } else { + dataSource_ = value; + } + onChanged(); + } else { + if (dataSourceCase_ == 3) { + httpDataSourceBuilder_.mergeFrom(value); + } + httpDataSourceBuilder_.setMessage(value); + } + dataSourceCase_ = 3; + return this; + } + /** + * + * + *
+       * An HTTP URL data source.
+       * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + */ + public Builder clearHttpDataSource() { + if (httpDataSourceBuilder_ == null) { + if (dataSourceCase_ == 3) { + dataSourceCase_ = 0; + dataSource_ = null; + onChanged(); + } + } else { + if (dataSourceCase_ == 3) { + dataSourceCase_ = 0; + dataSource_ = null; + } + httpDataSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * An HTTP URL data source.
+       * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.HttpData.Builder + getHttpDataSourceBuilder() { + return getHttpDataSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * An HTTP URL data source.
+       * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.HttpDataOrBuilder + getHttpDataSourceOrBuilder() { + if ((dataSourceCase_ == 3) && (httpDataSourceBuilder_ != null)) { + return httpDataSourceBuilder_.getMessageOrBuilder(); + } else { + if (dataSourceCase_ == 3) { + return (com.google.storagetransfer.v1.proto.TransferTypes.HttpData) dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.HttpData.getDefaultInstance(); + } + } + /** + * + * + *
+       * An HTTP URL data source.
+       * 
+ * + * .google.storagetransfer.v1.HttpData http_data_source = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.HttpData, + com.google.storagetransfer.v1.proto.TransferTypes.HttpData.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.HttpDataOrBuilder> + getHttpDataSourceFieldBuilder() { + if (httpDataSourceBuilder_ == null) { + if (!(dataSourceCase_ == 3)) { + dataSource_ = + com.google.storagetransfer.v1.proto.TransferTypes.HttpData.getDefaultInstance(); + } + httpDataSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.HttpData, + com.google.storagetransfer.v1.proto.TransferTypes.HttpData.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.HttpDataOrBuilder>( + (com.google.storagetransfer.v1.proto.TransferTypes.HttpData) dataSource_, + getParentForChildren(), + isClean()); + dataSource_ = null; + } + dataSourceCase_ = 3; + onChanged(); + ; + return httpDataSourceBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData, + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageDataOrBuilder> + azureBlobStorageDataSourceBuilder_; + /** + * + * + *
+       * An Azure Blob Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + * + * @return Whether the azureBlobStorageDataSource field is set. + */ + @java.lang.Override + public boolean hasAzureBlobStorageDataSource() { + return dataSourceCase_ == 8; + } + /** + * + * + *
+       * An Azure Blob Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + * + * @return The azureBlobStorageDataSource. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + getAzureBlobStorageDataSource() { + if (azureBlobStorageDataSourceBuilder_ == null) { + if (dataSourceCase_ == 8) { + return (com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) + dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + .getDefaultInstance(); + } else { + if (dataSourceCase_ == 8) { + return azureBlobStorageDataSourceBuilder_.getMessage(); + } + return com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + .getDefaultInstance(); + } + } + /** + * + * + *
+       * An Azure Blob Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + */ + public Builder setAzureBlobStorageDataSource( + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData value) { + if (azureBlobStorageDataSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + onChanged(); + } else { + azureBlobStorageDataSourceBuilder_.setMessage(value); + } + dataSourceCase_ = 8; + return this; + } + /** + * + * + *
+       * An Azure Blob Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + */ + public Builder setAzureBlobStorageDataSource( + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData.Builder + builderForValue) { + if (azureBlobStorageDataSourceBuilder_ == null) { + dataSource_ = builderForValue.build(); + onChanged(); + } else { + azureBlobStorageDataSourceBuilder_.setMessage(builderForValue.build()); + } + dataSourceCase_ = 8; + return this; + } + /** + * + * + *
+       * An Azure Blob Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + */ + public Builder mergeAzureBlobStorageDataSource( + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData value) { + if (azureBlobStorageDataSourceBuilder_ == null) { + if (dataSourceCase_ == 8 + && dataSource_ + != com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + .getDefaultInstance()) { + dataSource_ = + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData.newBuilder( + (com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) + dataSource_) + .mergeFrom(value) + .buildPartial(); + } else { + dataSource_ = value; + } + onChanged(); + } else { + if (dataSourceCase_ == 8) { + azureBlobStorageDataSourceBuilder_.mergeFrom(value); + } + azureBlobStorageDataSourceBuilder_.setMessage(value); + } + dataSourceCase_ = 8; + return this; + } + /** + * + * + *
+       * An Azure Blob Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + */ + public Builder clearAzureBlobStorageDataSource() { + if (azureBlobStorageDataSourceBuilder_ == null) { + if (dataSourceCase_ == 8) { + dataSourceCase_ = 0; + dataSource_ = null; + onChanged(); + } + } else { + if (dataSourceCase_ == 8) { + dataSourceCase_ = 0; + dataSource_ = null; + } + azureBlobStorageDataSourceBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * An Azure Blob Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + */ + public com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData.Builder + getAzureBlobStorageDataSourceBuilder() { + return getAzureBlobStorageDataSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * An Azure Blob Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageDataOrBuilder + getAzureBlobStorageDataSourceOrBuilder() { + if ((dataSourceCase_ == 8) && (azureBlobStorageDataSourceBuilder_ != null)) { + return azureBlobStorageDataSourceBuilder_.getMessageOrBuilder(); + } else { + if (dataSourceCase_ == 8) { + return (com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) + dataSource_; + } + return com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + .getDefaultInstance(); + } + } + /** + * + * + *
+       * An Azure Blob Storage data source.
+       * 
+ * + * .google.storagetransfer.v1.AzureBlobStorageData azure_blob_storage_data_source = 8; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData, + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageDataOrBuilder> + getAzureBlobStorageDataSourceFieldBuilder() { + if (azureBlobStorageDataSourceBuilder_ == null) { + if (!(dataSourceCase_ == 8)) { + dataSource_ = + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData + .getDefaultInstance(); + } + azureBlobStorageDataSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData, + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageDataOrBuilder>( + (com.google.storagetransfer.v1.proto.TransferTypes.AzureBlobStorageData) + dataSource_, + getParentForChildren(), + isClean()); + dataSource_ = null; + } + dataSourceCase_ = 8; + onChanged(); + ; + return azureBlobStorageDataSourceBuilder_; + } + + private com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions objectConditions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions, + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditionsOrBuilder> + objectConditionsBuilder_; + /** + * + * + *
+       * Only objects that satisfy these object conditions are included in the set
+       * of data source and data sink objects.  Object conditions based on
+       * objects' "last modification time" do not exclude objects in a data sink.
+       * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + * + * @return Whether the objectConditions field is set. + */ + public boolean hasObjectConditions() { + return objectConditionsBuilder_ != null || objectConditions_ != null; + } + /** + * + * + *
+       * Only objects that satisfy these object conditions are included in the set
+       * of data source and data sink objects.  Object conditions based on
+       * objects' "last modification time" do not exclude objects in a data sink.
+       * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + * + * @return The objectConditions. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions + getObjectConditions() { + if (objectConditionsBuilder_ == null) { + return objectConditions_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions + .getDefaultInstance() + : objectConditions_; + } else { + return objectConditionsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Only objects that satisfy these object conditions are included in the set
+       * of data source and data sink objects.  Object conditions based on
+       * objects' "last modification time" do not exclude objects in a data sink.
+       * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + */ + public Builder setObjectConditions( + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions value) { + if (objectConditionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + objectConditions_ = value; + onChanged(); + } else { + objectConditionsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Only objects that satisfy these object conditions are included in the set
+       * of data source and data sink objects.  Object conditions based on
+       * objects' "last modification time" do not exclude objects in a data sink.
+       * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + */ + public Builder setObjectConditions( + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.Builder + builderForValue) { + if (objectConditionsBuilder_ == null) { + objectConditions_ = builderForValue.build(); + onChanged(); + } else { + objectConditionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Only objects that satisfy these object conditions are included in the set
+       * of data source and data sink objects.  Object conditions based on
+       * objects' "last modification time" do not exclude objects in a data sink.
+       * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + */ + public Builder mergeObjectConditions( + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions value) { + if (objectConditionsBuilder_ == null) { + if (objectConditions_ != null) { + objectConditions_ = + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.newBuilder( + objectConditions_) + .mergeFrom(value) + .buildPartial(); + } else { + objectConditions_ = value; + } + onChanged(); + } else { + objectConditionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Only objects that satisfy these object conditions are included in the set
+       * of data source and data sink objects.  Object conditions based on
+       * objects' "last modification time" do not exclude objects in a data sink.
+       * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + */ + public Builder clearObjectConditions() { + if (objectConditionsBuilder_ == null) { + objectConditions_ = null; + onChanged(); + } else { + objectConditions_ = null; + objectConditionsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Only objects that satisfy these object conditions are included in the set
+       * of data source and data sink objects.  Object conditions based on
+       * objects' "last modification time" do not exclude objects in a data sink.
+       * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.Builder + getObjectConditionsBuilder() { + + onChanged(); + return getObjectConditionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Only objects that satisfy these object conditions are included in the set
+       * of data source and data sink objects.  Object conditions based on
+       * objects' "last modification time" do not exclude objects in a data sink.
+       * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditionsOrBuilder + getObjectConditionsOrBuilder() { + if (objectConditionsBuilder_ != null) { + return objectConditionsBuilder_.getMessageOrBuilder(); + } else { + return objectConditions_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions + .getDefaultInstance() + : objectConditions_; + } + } + /** + * + * + *
+       * Only objects that satisfy these object conditions are included in the set
+       * of data source and data sink objects.  Object conditions based on
+       * objects' "last modification time" do not exclude objects in a data sink.
+       * 
+ * + * .google.storagetransfer.v1.ObjectConditions object_conditions = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions, + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditionsOrBuilder> + getObjectConditionsFieldBuilder() { + if (objectConditionsBuilder_ == null) { + objectConditionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions, + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditions.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.ObjectConditionsOrBuilder>( + getObjectConditions(), getParentForChildren(), isClean()); + objectConditions_ = null; + } + return objectConditionsBuilder_; + } + + private com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions transferOptions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions, + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptionsOrBuilder> + transferOptionsBuilder_; + /** + * + * + *
+       * If the option
+       * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+       * is `true` and time-based object conditions such as 'last modification time'
+       * are specified, the request fails with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + * + * @return Whether the transferOptions field is set. + */ + public boolean hasTransferOptions() { + return transferOptionsBuilder_ != null || transferOptions_ != null; + } + /** + * + * + *
+       * If the option
+       * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+       * is `true` and time-based object conditions such as 'last modification time'
+       * are specified, the request fails with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + * + * @return The transferOptions. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions + getTransferOptions() { + if (transferOptionsBuilder_ == null) { + return transferOptions_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions + .getDefaultInstance() + : transferOptions_; + } else { + return transferOptionsBuilder_.getMessage(); + } + } + /** + * + * + *
+       * If the option
+       * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+       * is `true` and time-based object conditions such as 'last modification time'
+       * are specified, the request fails with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + */ + public Builder setTransferOptions( + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions value) { + if (transferOptionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transferOptions_ = value; + onChanged(); + } else { + transferOptionsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * If the option
+       * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+       * is `true` and time-based object conditions such as 'last modification time'
+       * are specified, the request fails with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + */ + public Builder setTransferOptions( + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.Builder + builderForValue) { + if (transferOptionsBuilder_ == null) { + transferOptions_ = builderForValue.build(); + onChanged(); + } else { + transferOptionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * If the option
+       * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+       * is `true` and time-based object conditions such as 'last modification time'
+       * are specified, the request fails with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + */ + public Builder mergeTransferOptions( + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions value) { + if (transferOptionsBuilder_ == null) { + if (transferOptions_ != null) { + transferOptions_ = + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.newBuilder( + transferOptions_) + .mergeFrom(value) + .buildPartial(); + } else { + transferOptions_ = value; + } + onChanged(); + } else { + transferOptionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * If the option
+       * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+       * is `true` and time-based object conditions such as 'last modification time'
+       * are specified, the request fails with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + */ + public Builder clearTransferOptions() { + if (transferOptionsBuilder_ == null) { + transferOptions_ = null; + onChanged(); + } else { + transferOptions_ = null; + transferOptionsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * If the option
+       * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+       * is `true` and time-based object conditions such as 'last modification time'
+       * are specified, the request fails with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.Builder + getTransferOptionsBuilder() { + + onChanged(); + return getTransferOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * If the option
+       * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+       * is `true` and time-based object conditions such as 'last modification time'
+       * are specified, the request fails with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOptionsOrBuilder + getTransferOptionsOrBuilder() { + if (transferOptionsBuilder_ != null) { + return transferOptionsBuilder_.getMessageOrBuilder(); + } else { + return transferOptions_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions + .getDefaultInstance() + : transferOptions_; + } + } + /** + * + * + *
+       * If the option
+       * [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink]
+       * is `true` and time-based object conditions such as 'last modification time'
+       * are specified, the request fails with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * .google.storagetransfer.v1.TransferOptions transfer_options = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions, + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptionsOrBuilder> + getTransferOptionsFieldBuilder() { + if (transferOptionsBuilder_ == null) { + transferOptionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions, + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptions.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferOptionsOrBuilder>( + getTransferOptions(), getParentForChildren(), isClean()); + transferOptions_ = null; + } + return transferOptionsBuilder_; + } + + @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.storagetransfer.v1.TransferSpec) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.TransferSpec) + private static final com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransferSpec parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransferSpec(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.storagetransfer.v1.proto.TransferTypes.TransferSpec + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ScheduleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.Schedule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The start date of a transfer. Date boundaries are determined
+     * relative to UTC time. If `schedule_start_date` and
+     * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+     * are in the past relative to the job's creation time, the transfer starts
+     * the day after you schedule the transfer request.
+     * **Note:** When starting jobs at or near midnight UTC it is possible that
+     * a job will start later than expected. For example, if you send an outbound
+     * request on June 1 one millisecond prior to midnight UTC and the Storage
+     * Transfer Service server receives the request on June 2, then it will create
+     * a TransferJob with `schedule_start_date` set to June 2 and a
+     * `start_time_of_day` set to midnight UTC. The first scheduled
+     * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+     * place on June 3 at midnight UTC.
+     * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the scheduleStartDate field is set. + */ + boolean hasScheduleStartDate(); + /** + * + * + *
+     * Required. The start date of a transfer. Date boundaries are determined
+     * relative to UTC time. If `schedule_start_date` and
+     * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+     * are in the past relative to the job's creation time, the transfer starts
+     * the day after you schedule the transfer request.
+     * **Note:** When starting jobs at or near midnight UTC it is possible that
+     * a job will start later than expected. For example, if you send an outbound
+     * request on June 1 one millisecond prior to midnight UTC and the Storage
+     * Transfer Service server receives the request on June 2, then it will create
+     * a TransferJob with `schedule_start_date` set to June 2 and a
+     * `start_time_of_day` set to midnight UTC. The first scheduled
+     * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+     * place on June 3 at midnight UTC.
+     * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The scheduleStartDate. + */ + com.google.type.Date getScheduleStartDate(); + /** + * + * + *
+     * Required. The start date of a transfer. Date boundaries are determined
+     * relative to UTC time. If `schedule_start_date` and
+     * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+     * are in the past relative to the job's creation time, the transfer starts
+     * the day after you schedule the transfer request.
+     * **Note:** When starting jobs at or near midnight UTC it is possible that
+     * a job will start later than expected. For example, if you send an outbound
+     * request on June 1 one millisecond prior to midnight UTC and the Storage
+     * Transfer Service server receives the request on June 2, then it will create
+     * a TransferJob with `schedule_start_date` set to June 2 and a
+     * `start_time_of_day` set to midnight UTC. The first scheduled
+     * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+     * place on June 3 at midnight UTC.
+     * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.type.DateOrBuilder getScheduleStartDateOrBuilder(); + + /** + * + * + *
+     * The last day a transfer runs. Date boundaries are determined relative to
+     * UTC time. A job will run once per 24 hours within the following guidelines:
+     * *   If `schedule_end_date` and
+     * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+     * are the same and in
+     *     the future relative to UTC, the transfer is executed only one time.
+     * *   If `schedule_end_date` is later than `schedule_start_date`  and
+     *     `schedule_end_date` is in the future relative to UTC, the job will
+     *     run each day at
+     *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+     *     through `schedule_end_date`.
+     * 
+ * + * .google.type.Date schedule_end_date = 2; + * + * @return Whether the scheduleEndDate field is set. + */ + boolean hasScheduleEndDate(); + /** + * + * + *
+     * The last day a transfer runs. Date boundaries are determined relative to
+     * UTC time. A job will run once per 24 hours within the following guidelines:
+     * *   If `schedule_end_date` and
+     * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+     * are the same and in
+     *     the future relative to UTC, the transfer is executed only one time.
+     * *   If `schedule_end_date` is later than `schedule_start_date`  and
+     *     `schedule_end_date` is in the future relative to UTC, the job will
+     *     run each day at
+     *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+     *     through `schedule_end_date`.
+     * 
+ * + * .google.type.Date schedule_end_date = 2; + * + * @return The scheduleEndDate. + */ + com.google.type.Date getScheduleEndDate(); + /** + * + * + *
+     * The last day a transfer runs. Date boundaries are determined relative to
+     * UTC time. A job will run once per 24 hours within the following guidelines:
+     * *   If `schedule_end_date` and
+     * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+     * are the same and in
+     *     the future relative to UTC, the transfer is executed only one time.
+     * *   If `schedule_end_date` is later than `schedule_start_date`  and
+     *     `schedule_end_date` is in the future relative to UTC, the job will
+     *     run each day at
+     *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+     *     through `schedule_end_date`.
+     * 
+ * + * .google.type.Date schedule_end_date = 2; + */ + com.google.type.DateOrBuilder getScheduleEndDateOrBuilder(); + + /** + * + * + *
+     * The time in UTC that a transfer job is scheduled to run. Transfers may
+     * start later than this time.
+     * If `start_time_of_day` is not specified:
+     * *   One-time transfers run immediately.
+     * *   Recurring transfers run immediately, and each day at midnight UTC,
+     *     through
+     *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+     * If `start_time_of_day` is specified:
+     * *   One-time transfers run at the specified time.
+     * *   Recurring transfers run at the specified time each day, through
+     *     `schedule_end_date`.
+     * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + * + * @return Whether the startTimeOfDay field is set. + */ + boolean hasStartTimeOfDay(); + /** + * + * + *
+     * The time in UTC that a transfer job is scheduled to run. Transfers may
+     * start later than this time.
+     * If `start_time_of_day` is not specified:
+     * *   One-time transfers run immediately.
+     * *   Recurring transfers run immediately, and each day at midnight UTC,
+     *     through
+     *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+     * If `start_time_of_day` is specified:
+     * *   One-time transfers run at the specified time.
+     * *   Recurring transfers run at the specified time each day, through
+     *     `schedule_end_date`.
+     * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + * + * @return The startTimeOfDay. + */ + com.google.type.TimeOfDay getStartTimeOfDay(); + /** + * + * + *
+     * The time in UTC that a transfer job is scheduled to run. Transfers may
+     * start later than this time.
+     * If `start_time_of_day` is not specified:
+     * *   One-time transfers run immediately.
+     * *   Recurring transfers run immediately, and each day at midnight UTC,
+     *     through
+     *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+     * If `start_time_of_day` is specified:
+     * *   One-time transfers run at the specified time.
+     * *   Recurring transfers run at the specified time each day, through
+     *     `schedule_end_date`.
+     * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + */ + com.google.type.TimeOfDayOrBuilder getStartTimeOfDayOrBuilder(); + + /** + * + * + *
+     * The time in UTC that no further transfer operations are scheduled. Combined
+     * with
+     * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+     * `end_time_of_day` specifies the end date and time for starting new transfer
+     * operations. This field must be greater than or equal to the timestamp
+     * corresponding to the combintation of
+     * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+     * and
+     * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+     * and is subject to the following:
+     * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+     *     a default value of `23:59:59` is used for `end_time_of_day`.
+     * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+     *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+     * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + * + * @return Whether the endTimeOfDay field is set. + */ + boolean hasEndTimeOfDay(); + /** + * + * + *
+     * The time in UTC that no further transfer operations are scheduled. Combined
+     * with
+     * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+     * `end_time_of_day` specifies the end date and time for starting new transfer
+     * operations. This field must be greater than or equal to the timestamp
+     * corresponding to the combintation of
+     * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+     * and
+     * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+     * and is subject to the following:
+     * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+     *     a default value of `23:59:59` is used for `end_time_of_day`.
+     * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+     *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+     * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + * + * @return The endTimeOfDay. + */ + com.google.type.TimeOfDay getEndTimeOfDay(); + /** + * + * + *
+     * The time in UTC that no further transfer operations are scheduled. Combined
+     * with
+     * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+     * `end_time_of_day` specifies the end date and time for starting new transfer
+     * operations. This field must be greater than or equal to the timestamp
+     * corresponding to the combintation of
+     * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+     * and
+     * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+     * and is subject to the following:
+     * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+     *     a default value of `23:59:59` is used for `end_time_of_day`.
+     * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+     *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+     * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + */ + com.google.type.TimeOfDayOrBuilder getEndTimeOfDayOrBuilder(); + + /** + * + * + *
+     * Interval between the start of each scheduled TransferOperation. If
+     * unspecified, the default value is 24 hours. This value may not be less than
+     * 1 hour.
+     * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + * + * @return Whether the repeatInterval field is set. + */ + boolean hasRepeatInterval(); + /** + * + * + *
+     * Interval between the start of each scheduled TransferOperation. If
+     * unspecified, the default value is 24 hours. This value may not be less than
+     * 1 hour.
+     * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + * + * @return The repeatInterval. + */ + com.google.protobuf.Duration getRepeatInterval(); + /** + * + * + *
+     * Interval between the start of each scheduled TransferOperation. If
+     * unspecified, the default value is 24 hours. This value may not be less than
+     * 1 hour.
+     * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + */ + com.google.protobuf.DurationOrBuilder getRepeatIntervalOrBuilder(); + } + /** + * + * + *
+   * Transfers can be scheduled to recur or to run just once.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.Schedule} + */ + public static final class Schedule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.Schedule) + ScheduleOrBuilder { + private static final long serialVersionUID = 0L; + // Use Schedule.newBuilder() to construct. + private Schedule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Schedule() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Schedule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Schedule( + 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.type.Date.Builder subBuilder = null; + if (scheduleStartDate_ != null) { + subBuilder = scheduleStartDate_.toBuilder(); + } + scheduleStartDate_ = + input.readMessage(com.google.type.Date.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scheduleStartDate_); + scheduleStartDate_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.type.Date.Builder subBuilder = null; + if (scheduleEndDate_ != null) { + subBuilder = scheduleEndDate_.toBuilder(); + } + scheduleEndDate_ = + input.readMessage(com.google.type.Date.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scheduleEndDate_); + scheduleEndDate_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.type.TimeOfDay.Builder subBuilder = null; + if (startTimeOfDay_ != null) { + subBuilder = startTimeOfDay_.toBuilder(); + } + startTimeOfDay_ = + input.readMessage(com.google.type.TimeOfDay.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTimeOfDay_); + startTimeOfDay_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.type.TimeOfDay.Builder subBuilder = null; + if (endTimeOfDay_ != null) { + subBuilder = endTimeOfDay_.toBuilder(); + } + endTimeOfDay_ = + input.readMessage(com.google.type.TimeOfDay.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTimeOfDay_); + endTimeOfDay_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (repeatInterval_ != null) { + subBuilder = repeatInterval_.toBuilder(); + } + repeatInterval_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(repeatInterval_); + repeatInterval_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_Schedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_Schedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.Schedule.class, + com.google.storagetransfer.v1.proto.TransferTypes.Schedule.Builder.class); + } + + public static final int SCHEDULE_START_DATE_FIELD_NUMBER = 1; + private com.google.type.Date scheduleStartDate_; + /** + * + * + *
+     * Required. The start date of a transfer. Date boundaries are determined
+     * relative to UTC time. If `schedule_start_date` and
+     * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+     * are in the past relative to the job's creation time, the transfer starts
+     * the day after you schedule the transfer request.
+     * **Note:** When starting jobs at or near midnight UTC it is possible that
+     * a job will start later than expected. For example, if you send an outbound
+     * request on June 1 one millisecond prior to midnight UTC and the Storage
+     * Transfer Service server receives the request on June 2, then it will create
+     * a TransferJob with `schedule_start_date` set to June 2 and a
+     * `start_time_of_day` set to midnight UTC. The first scheduled
+     * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+     * place on June 3 at midnight UTC.
+     * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the scheduleStartDate field is set. + */ + @java.lang.Override + public boolean hasScheduleStartDate() { + return scheduleStartDate_ != null; + } + /** + * + * + *
+     * Required. The start date of a transfer. Date boundaries are determined
+     * relative to UTC time. If `schedule_start_date` and
+     * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+     * are in the past relative to the job's creation time, the transfer starts
+     * the day after you schedule the transfer request.
+     * **Note:** When starting jobs at or near midnight UTC it is possible that
+     * a job will start later than expected. For example, if you send an outbound
+     * request on June 1 one millisecond prior to midnight UTC and the Storage
+     * Transfer Service server receives the request on June 2, then it will create
+     * a TransferJob with `schedule_start_date` set to June 2 and a
+     * `start_time_of_day` set to midnight UTC. The first scheduled
+     * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+     * place on June 3 at midnight UTC.
+     * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The scheduleStartDate. + */ + @java.lang.Override + public com.google.type.Date getScheduleStartDate() { + return scheduleStartDate_ == null + ? com.google.type.Date.getDefaultInstance() + : scheduleStartDate_; + } + /** + * + * + *
+     * Required. The start date of a transfer. Date boundaries are determined
+     * relative to UTC time. If `schedule_start_date` and
+     * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+     * are in the past relative to the job's creation time, the transfer starts
+     * the day after you schedule the transfer request.
+     * **Note:** When starting jobs at or near midnight UTC it is possible that
+     * a job will start later than expected. For example, if you send an outbound
+     * request on June 1 one millisecond prior to midnight UTC and the Storage
+     * Transfer Service server receives the request on June 2, then it will create
+     * a TransferJob with `schedule_start_date` set to June 2 and a
+     * `start_time_of_day` set to midnight UTC. The first scheduled
+     * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+     * place on June 3 at midnight UTC.
+     * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.type.DateOrBuilder getScheduleStartDateOrBuilder() { + return getScheduleStartDate(); + } + + public static final int SCHEDULE_END_DATE_FIELD_NUMBER = 2; + private com.google.type.Date scheduleEndDate_; + /** + * + * + *
+     * The last day a transfer runs. Date boundaries are determined relative to
+     * UTC time. A job will run once per 24 hours within the following guidelines:
+     * *   If `schedule_end_date` and
+     * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+     * are the same and in
+     *     the future relative to UTC, the transfer is executed only one time.
+     * *   If `schedule_end_date` is later than `schedule_start_date`  and
+     *     `schedule_end_date` is in the future relative to UTC, the job will
+     *     run each day at
+     *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+     *     through `schedule_end_date`.
+     * 
+ * + * .google.type.Date schedule_end_date = 2; + * + * @return Whether the scheduleEndDate field is set. + */ + @java.lang.Override + public boolean hasScheduleEndDate() { + return scheduleEndDate_ != null; + } + /** + * + * + *
+     * The last day a transfer runs. Date boundaries are determined relative to
+     * UTC time. A job will run once per 24 hours within the following guidelines:
+     * *   If `schedule_end_date` and
+     * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+     * are the same and in
+     *     the future relative to UTC, the transfer is executed only one time.
+     * *   If `schedule_end_date` is later than `schedule_start_date`  and
+     *     `schedule_end_date` is in the future relative to UTC, the job will
+     *     run each day at
+     *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+     *     through `schedule_end_date`.
+     * 
+ * + * .google.type.Date schedule_end_date = 2; + * + * @return The scheduleEndDate. + */ + @java.lang.Override + public com.google.type.Date getScheduleEndDate() { + return scheduleEndDate_ == null + ? com.google.type.Date.getDefaultInstance() + : scheduleEndDate_; + } + /** + * + * + *
+     * The last day a transfer runs. Date boundaries are determined relative to
+     * UTC time. A job will run once per 24 hours within the following guidelines:
+     * *   If `schedule_end_date` and
+     * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+     * are the same and in
+     *     the future relative to UTC, the transfer is executed only one time.
+     * *   If `schedule_end_date` is later than `schedule_start_date`  and
+     *     `schedule_end_date` is in the future relative to UTC, the job will
+     *     run each day at
+     *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+     *     through `schedule_end_date`.
+     * 
+ * + * .google.type.Date schedule_end_date = 2; + */ + @java.lang.Override + public com.google.type.DateOrBuilder getScheduleEndDateOrBuilder() { + return getScheduleEndDate(); + } + + public static final int START_TIME_OF_DAY_FIELD_NUMBER = 3; + private com.google.type.TimeOfDay startTimeOfDay_; + /** + * + * + *
+     * The time in UTC that a transfer job is scheduled to run. Transfers may
+     * start later than this time.
+     * If `start_time_of_day` is not specified:
+     * *   One-time transfers run immediately.
+     * *   Recurring transfers run immediately, and each day at midnight UTC,
+     *     through
+     *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+     * If `start_time_of_day` is specified:
+     * *   One-time transfers run at the specified time.
+     * *   Recurring transfers run at the specified time each day, through
+     *     `schedule_end_date`.
+     * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + * + * @return Whether the startTimeOfDay field is set. + */ + @java.lang.Override + public boolean hasStartTimeOfDay() { + return startTimeOfDay_ != null; + } + /** + * + * + *
+     * The time in UTC that a transfer job is scheduled to run. Transfers may
+     * start later than this time.
+     * If `start_time_of_day` is not specified:
+     * *   One-time transfers run immediately.
+     * *   Recurring transfers run immediately, and each day at midnight UTC,
+     *     through
+     *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+     * If `start_time_of_day` is specified:
+     * *   One-time transfers run at the specified time.
+     * *   Recurring transfers run at the specified time each day, through
+     *     `schedule_end_date`.
+     * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + * + * @return The startTimeOfDay. + */ + @java.lang.Override + public com.google.type.TimeOfDay getStartTimeOfDay() { + return startTimeOfDay_ == null + ? com.google.type.TimeOfDay.getDefaultInstance() + : startTimeOfDay_; + } + /** + * + * + *
+     * The time in UTC that a transfer job is scheduled to run. Transfers may
+     * start later than this time.
+     * If `start_time_of_day` is not specified:
+     * *   One-time transfers run immediately.
+     * *   Recurring transfers run immediately, and each day at midnight UTC,
+     *     through
+     *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+     * If `start_time_of_day` is specified:
+     * *   One-time transfers run at the specified time.
+     * *   Recurring transfers run at the specified time each day, through
+     *     `schedule_end_date`.
+     * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + */ + @java.lang.Override + public com.google.type.TimeOfDayOrBuilder getStartTimeOfDayOrBuilder() { + return getStartTimeOfDay(); + } + + public static final int END_TIME_OF_DAY_FIELD_NUMBER = 4; + private com.google.type.TimeOfDay endTimeOfDay_; + /** + * + * + *
+     * The time in UTC that no further transfer operations are scheduled. Combined
+     * with
+     * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+     * `end_time_of_day` specifies the end date and time for starting new transfer
+     * operations. This field must be greater than or equal to the timestamp
+     * corresponding to the combintation of
+     * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+     * and
+     * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+     * and is subject to the following:
+     * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+     *     a default value of `23:59:59` is used for `end_time_of_day`.
+     * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+     *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+     * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + * + * @return Whether the endTimeOfDay field is set. + */ + @java.lang.Override + public boolean hasEndTimeOfDay() { + return endTimeOfDay_ != null; + } + /** + * + * + *
+     * The time in UTC that no further transfer operations are scheduled. Combined
+     * with
+     * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+     * `end_time_of_day` specifies the end date and time for starting new transfer
+     * operations. This field must be greater than or equal to the timestamp
+     * corresponding to the combintation of
+     * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+     * and
+     * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+     * and is subject to the following:
+     * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+     *     a default value of `23:59:59` is used for `end_time_of_day`.
+     * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+     *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+     * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + * + * @return The endTimeOfDay. + */ + @java.lang.Override + public com.google.type.TimeOfDay getEndTimeOfDay() { + return endTimeOfDay_ == null ? com.google.type.TimeOfDay.getDefaultInstance() : endTimeOfDay_; + } + /** + * + * + *
+     * The time in UTC that no further transfer operations are scheduled. Combined
+     * with
+     * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+     * `end_time_of_day` specifies the end date and time for starting new transfer
+     * operations. This field must be greater than or equal to the timestamp
+     * corresponding to the combintation of
+     * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+     * and
+     * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+     * and is subject to the following:
+     * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+     *     a default value of `23:59:59` is used for `end_time_of_day`.
+     * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+     *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+     * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + */ + @java.lang.Override + public com.google.type.TimeOfDayOrBuilder getEndTimeOfDayOrBuilder() { + return getEndTimeOfDay(); + } + + public static final int REPEAT_INTERVAL_FIELD_NUMBER = 5; + private com.google.protobuf.Duration repeatInterval_; + /** + * + * + *
+     * Interval between the start of each scheduled TransferOperation. If
+     * unspecified, the default value is 24 hours. This value may not be less than
+     * 1 hour.
+     * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + * + * @return Whether the repeatInterval field is set. + */ + @java.lang.Override + public boolean hasRepeatInterval() { + return repeatInterval_ != null; + } + /** + * + * + *
+     * Interval between the start of each scheduled TransferOperation. If
+     * unspecified, the default value is 24 hours. This value may not be less than
+     * 1 hour.
+     * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + * + * @return The repeatInterval. + */ + @java.lang.Override + public com.google.protobuf.Duration getRepeatInterval() { + return repeatInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : repeatInterval_; + } + /** + * + * + *
+     * Interval between the start of each scheduled TransferOperation. If
+     * unspecified, the default value is 24 hours. This value may not be less than
+     * 1 hour.
+     * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getRepeatIntervalOrBuilder() { + return getRepeatInterval(); + } + + 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 (scheduleStartDate_ != null) { + output.writeMessage(1, getScheduleStartDate()); + } + if (scheduleEndDate_ != null) { + output.writeMessage(2, getScheduleEndDate()); + } + if (startTimeOfDay_ != null) { + output.writeMessage(3, getStartTimeOfDay()); + } + if (endTimeOfDay_ != null) { + output.writeMessage(4, getEndTimeOfDay()); + } + if (repeatInterval_ != null) { + output.writeMessage(5, getRepeatInterval()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (scheduleStartDate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getScheduleStartDate()); + } + if (scheduleEndDate_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getScheduleEndDate()); + } + if (startTimeOfDay_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStartTimeOfDay()); + } + if (endTimeOfDay_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndTimeOfDay()); + } + if (repeatInterval_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRepeatInterval()); + } + 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.storagetransfer.v1.proto.TransferTypes.Schedule)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.Schedule other = + (com.google.storagetransfer.v1.proto.TransferTypes.Schedule) obj; + + if (hasScheduleStartDate() != other.hasScheduleStartDate()) return false; + if (hasScheduleStartDate()) { + if (!getScheduleStartDate().equals(other.getScheduleStartDate())) return false; + } + if (hasScheduleEndDate() != other.hasScheduleEndDate()) return false; + if (hasScheduleEndDate()) { + if (!getScheduleEndDate().equals(other.getScheduleEndDate())) return false; + } + if (hasStartTimeOfDay() != other.hasStartTimeOfDay()) return false; + if (hasStartTimeOfDay()) { + if (!getStartTimeOfDay().equals(other.getStartTimeOfDay())) return false; + } + if (hasEndTimeOfDay() != other.hasEndTimeOfDay()) return false; + if (hasEndTimeOfDay()) { + if (!getEndTimeOfDay().equals(other.getEndTimeOfDay())) return false; + } + if (hasRepeatInterval() != other.hasRepeatInterval()) return false; + if (hasRepeatInterval()) { + if (!getRepeatInterval().equals(other.getRepeatInterval())) 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 (hasScheduleStartDate()) { + hash = (37 * hash) + SCHEDULE_START_DATE_FIELD_NUMBER; + hash = (53 * hash) + getScheduleStartDate().hashCode(); + } + if (hasScheduleEndDate()) { + hash = (37 * hash) + SCHEDULE_END_DATE_FIELD_NUMBER; + hash = (53 * hash) + getScheduleEndDate().hashCode(); + } + if (hasStartTimeOfDay()) { + hash = (37 * hash) + START_TIME_OF_DAY_FIELD_NUMBER; + hash = (53 * hash) + getStartTimeOfDay().hashCode(); + } + if (hasEndTimeOfDay()) { + hash = (37 * hash) + END_TIME_OF_DAY_FIELD_NUMBER; + hash = (53 * hash) + getEndTimeOfDay().hashCode(); + } + if (hasRepeatInterval()) { + hash = (37 * hash) + REPEAT_INTERVAL_FIELD_NUMBER; + hash = (53 * hash) + getRepeatInterval().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.Schedule parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.Schedule parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.Schedule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.Schedule 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.storagetransfer.v1.proto.TransferTypes.Schedule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.Schedule parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.Schedule parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.Schedule 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.storagetransfer.v1.proto.TransferTypes.Schedule parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.Schedule 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.storagetransfer.v1.proto.TransferTypes.Schedule parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.Schedule 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.storagetransfer.v1.proto.TransferTypes.Schedule 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; + } + /** + * + * + *
+     * Transfers can be scheduled to recur or to run just once.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.Schedule} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.Schedule) + com.google.storagetransfer.v1.proto.TransferTypes.ScheduleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_Schedule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_Schedule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.Schedule.class, + com.google.storagetransfer.v1.proto.TransferTypes.Schedule.Builder.class); + } + + // Construct using com.google.storagetransfer.v1.proto.TransferTypes.Schedule.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 (scheduleStartDateBuilder_ == null) { + scheduleStartDate_ = null; + } else { + scheduleStartDate_ = null; + scheduleStartDateBuilder_ = null; + } + if (scheduleEndDateBuilder_ == null) { + scheduleEndDate_ = null; + } else { + scheduleEndDate_ = null; + scheduleEndDateBuilder_ = null; + } + if (startTimeOfDayBuilder_ == null) { + startTimeOfDay_ = null; + } else { + startTimeOfDay_ = null; + startTimeOfDayBuilder_ = null; + } + if (endTimeOfDayBuilder_ == null) { + endTimeOfDay_ = null; + } else { + endTimeOfDay_ = null; + endTimeOfDayBuilder_ = null; + } + if (repeatIntervalBuilder_ == null) { + repeatInterval_ = null; + } else { + repeatInterval_ = null; + repeatIntervalBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_Schedule_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.Schedule + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.Schedule.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.Schedule build() { + com.google.storagetransfer.v1.proto.TransferTypes.Schedule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.Schedule buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.Schedule result = + new com.google.storagetransfer.v1.proto.TransferTypes.Schedule(this); + if (scheduleStartDateBuilder_ == null) { + result.scheduleStartDate_ = scheduleStartDate_; + } else { + result.scheduleStartDate_ = scheduleStartDateBuilder_.build(); + } + if (scheduleEndDateBuilder_ == null) { + result.scheduleEndDate_ = scheduleEndDate_; + } else { + result.scheduleEndDate_ = scheduleEndDateBuilder_.build(); + } + if (startTimeOfDayBuilder_ == null) { + result.startTimeOfDay_ = startTimeOfDay_; + } else { + result.startTimeOfDay_ = startTimeOfDayBuilder_.build(); + } + if (endTimeOfDayBuilder_ == null) { + result.endTimeOfDay_ = endTimeOfDay_; + } else { + result.endTimeOfDay_ = endTimeOfDayBuilder_.build(); + } + if (repeatIntervalBuilder_ == null) { + result.repeatInterval_ = repeatInterval_; + } else { + result.repeatInterval_ = repeatIntervalBuilder_.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.storagetransfer.v1.proto.TransferTypes.Schedule) { + return mergeFrom((com.google.storagetransfer.v1.proto.TransferTypes.Schedule) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storagetransfer.v1.proto.TransferTypes.Schedule other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.Schedule.getDefaultInstance()) + return this; + if (other.hasScheduleStartDate()) { + mergeScheduleStartDate(other.getScheduleStartDate()); + } + if (other.hasScheduleEndDate()) { + mergeScheduleEndDate(other.getScheduleEndDate()); + } + if (other.hasStartTimeOfDay()) { + mergeStartTimeOfDay(other.getStartTimeOfDay()); + } + if (other.hasEndTimeOfDay()) { + mergeEndTimeOfDay(other.getEndTimeOfDay()); + } + if (other.hasRepeatInterval()) { + mergeRepeatInterval(other.getRepeatInterval()); + } + 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.storagetransfer.v1.proto.TransferTypes.Schedule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.Schedule) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.Date scheduleStartDate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + scheduleStartDateBuilder_; + /** + * + * + *
+       * Required. The start date of a transfer. Date boundaries are determined
+       * relative to UTC time. If `schedule_start_date` and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       * are in the past relative to the job's creation time, the transfer starts
+       * the day after you schedule the transfer request.
+       * **Note:** When starting jobs at or near midnight UTC it is possible that
+       * a job will start later than expected. For example, if you send an outbound
+       * request on June 1 one millisecond prior to midnight UTC and the Storage
+       * Transfer Service server receives the request on June 2, then it will create
+       * a TransferJob with `schedule_start_date` set to June 2 and a
+       * `start_time_of_day` set to midnight UTC. The first scheduled
+       * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+       * place on June 3 at midnight UTC.
+       * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the scheduleStartDate field is set. + */ + public boolean hasScheduleStartDate() { + return scheduleStartDateBuilder_ != null || scheduleStartDate_ != null; + } + /** + * + * + *
+       * Required. The start date of a transfer. Date boundaries are determined
+       * relative to UTC time. If `schedule_start_date` and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       * are in the past relative to the job's creation time, the transfer starts
+       * the day after you schedule the transfer request.
+       * **Note:** When starting jobs at or near midnight UTC it is possible that
+       * a job will start later than expected. For example, if you send an outbound
+       * request on June 1 one millisecond prior to midnight UTC and the Storage
+       * Transfer Service server receives the request on June 2, then it will create
+       * a TransferJob with `schedule_start_date` set to June 2 and a
+       * `start_time_of_day` set to midnight UTC. The first scheduled
+       * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+       * place on June 3 at midnight UTC.
+       * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The scheduleStartDate. + */ + public com.google.type.Date getScheduleStartDate() { + if (scheduleStartDateBuilder_ == null) { + return scheduleStartDate_ == null + ? com.google.type.Date.getDefaultInstance() + : scheduleStartDate_; + } else { + return scheduleStartDateBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The start date of a transfer. Date boundaries are determined
+       * relative to UTC time. If `schedule_start_date` and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       * are in the past relative to the job's creation time, the transfer starts
+       * the day after you schedule the transfer request.
+       * **Note:** When starting jobs at or near midnight UTC it is possible that
+       * a job will start later than expected. For example, if you send an outbound
+       * request on June 1 one millisecond prior to midnight UTC and the Storage
+       * Transfer Service server receives the request on June 2, then it will create
+       * a TransferJob with `schedule_start_date` set to June 2 and a
+       * `start_time_of_day` set to midnight UTC. The first scheduled
+       * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+       * place on June 3 at midnight UTC.
+       * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setScheduleStartDate(com.google.type.Date value) { + if (scheduleStartDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduleStartDate_ = value; + onChanged(); + } else { + scheduleStartDateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. The start date of a transfer. Date boundaries are determined
+       * relative to UTC time. If `schedule_start_date` and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       * are in the past relative to the job's creation time, the transfer starts
+       * the day after you schedule the transfer request.
+       * **Note:** When starting jobs at or near midnight UTC it is possible that
+       * a job will start later than expected. For example, if you send an outbound
+       * request on June 1 one millisecond prior to midnight UTC and the Storage
+       * Transfer Service server receives the request on June 2, then it will create
+       * a TransferJob with `schedule_start_date` set to June 2 and a
+       * `start_time_of_day` set to midnight UTC. The first scheduled
+       * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+       * place on June 3 at midnight UTC.
+       * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setScheduleStartDate(com.google.type.Date.Builder builderForValue) { + if (scheduleStartDateBuilder_ == null) { + scheduleStartDate_ = builderForValue.build(); + onChanged(); + } else { + scheduleStartDateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. The start date of a transfer. Date boundaries are determined
+       * relative to UTC time. If `schedule_start_date` and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       * are in the past relative to the job's creation time, the transfer starts
+       * the day after you schedule the transfer request.
+       * **Note:** When starting jobs at or near midnight UTC it is possible that
+       * a job will start later than expected. For example, if you send an outbound
+       * request on June 1 one millisecond prior to midnight UTC and the Storage
+       * Transfer Service server receives the request on June 2, then it will create
+       * a TransferJob with `schedule_start_date` set to June 2 and a
+       * `start_time_of_day` set to midnight UTC. The first scheduled
+       * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+       * place on June 3 at midnight UTC.
+       * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeScheduleStartDate(com.google.type.Date value) { + if (scheduleStartDateBuilder_ == null) { + if (scheduleStartDate_ != null) { + scheduleStartDate_ = + com.google.type.Date.newBuilder(scheduleStartDate_).mergeFrom(value).buildPartial(); + } else { + scheduleStartDate_ = value; + } + onChanged(); + } else { + scheduleStartDateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. The start date of a transfer. Date boundaries are determined
+       * relative to UTC time. If `schedule_start_date` and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       * are in the past relative to the job's creation time, the transfer starts
+       * the day after you schedule the transfer request.
+       * **Note:** When starting jobs at or near midnight UTC it is possible that
+       * a job will start later than expected. For example, if you send an outbound
+       * request on June 1 one millisecond prior to midnight UTC and the Storage
+       * Transfer Service server receives the request on June 2, then it will create
+       * a TransferJob with `schedule_start_date` set to June 2 and a
+       * `start_time_of_day` set to midnight UTC. The first scheduled
+       * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+       * place on June 3 at midnight UTC.
+       * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearScheduleStartDate() { + if (scheduleStartDateBuilder_ == null) { + scheduleStartDate_ = null; + onChanged(); + } else { + scheduleStartDate_ = null; + scheduleStartDateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. The start date of a transfer. Date boundaries are determined
+       * relative to UTC time. If `schedule_start_date` and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       * are in the past relative to the job's creation time, the transfer starts
+       * the day after you schedule the transfer request.
+       * **Note:** When starting jobs at or near midnight UTC it is possible that
+       * a job will start later than expected. For example, if you send an outbound
+       * request on June 1 one millisecond prior to midnight UTC and the Storage
+       * Transfer Service server receives the request on June 2, then it will create
+       * a TransferJob with `schedule_start_date` set to June 2 and a
+       * `start_time_of_day` set to midnight UTC. The first scheduled
+       * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+       * place on June 3 at midnight UTC.
+       * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.type.Date.Builder getScheduleStartDateBuilder() { + + onChanged(); + return getScheduleStartDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The start date of a transfer. Date boundaries are determined
+       * relative to UTC time. If `schedule_start_date` and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       * are in the past relative to the job's creation time, the transfer starts
+       * the day after you schedule the transfer request.
+       * **Note:** When starting jobs at or near midnight UTC it is possible that
+       * a job will start later than expected. For example, if you send an outbound
+       * request on June 1 one millisecond prior to midnight UTC and the Storage
+       * Transfer Service server receives the request on June 2, then it will create
+       * a TransferJob with `schedule_start_date` set to June 2 and a
+       * `start_time_of_day` set to midnight UTC. The first scheduled
+       * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+       * place on June 3 at midnight UTC.
+       * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.type.DateOrBuilder getScheduleStartDateOrBuilder() { + if (scheduleStartDateBuilder_ != null) { + return scheduleStartDateBuilder_.getMessageOrBuilder(); + } else { + return scheduleStartDate_ == null + ? com.google.type.Date.getDefaultInstance() + : scheduleStartDate_; + } + } + /** + * + * + *
+       * Required. The start date of a transfer. Date boundaries are determined
+       * relative to UTC time. If `schedule_start_date` and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       * are in the past relative to the job's creation time, the transfer starts
+       * the day after you schedule the transfer request.
+       * **Note:** When starting jobs at or near midnight UTC it is possible that
+       * a job will start later than expected. For example, if you send an outbound
+       * request on June 1 one millisecond prior to midnight UTC and the Storage
+       * Transfer Service server receives the request on June 2, then it will create
+       * a TransferJob with `schedule_start_date` set to June 2 and a
+       * `start_time_of_day` set to midnight UTC. The first scheduled
+       * [TransferOperation][google.storagetransfer.v1.TransferOperation] will take
+       * place on June 3 at midnight UTC.
+       * 
+ * + * .google.type.Date schedule_start_date = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getScheduleStartDateFieldBuilder() { + if (scheduleStartDateBuilder_ == null) { + scheduleStartDateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, + com.google.type.Date.Builder, + com.google.type.DateOrBuilder>( + getScheduleStartDate(), getParentForChildren(), isClean()); + scheduleStartDate_ = null; + } + return scheduleStartDateBuilder_; + } + + private com.google.type.Date scheduleEndDate_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + scheduleEndDateBuilder_; + /** + * + * + *
+       * The last day a transfer runs. Date boundaries are determined relative to
+       * UTC time. A job will run once per 24 hours within the following guidelines:
+       * *   If `schedule_end_date` and
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * are the same and in
+       *     the future relative to UTC, the transfer is executed only one time.
+       * *   If `schedule_end_date` is later than `schedule_start_date`  and
+       *     `schedule_end_date` is in the future relative to UTC, the job will
+       *     run each day at
+       *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       *     through `schedule_end_date`.
+       * 
+ * + * .google.type.Date schedule_end_date = 2; + * + * @return Whether the scheduleEndDate field is set. + */ + public boolean hasScheduleEndDate() { + return scheduleEndDateBuilder_ != null || scheduleEndDate_ != null; + } + /** + * + * + *
+       * The last day a transfer runs. Date boundaries are determined relative to
+       * UTC time. A job will run once per 24 hours within the following guidelines:
+       * *   If `schedule_end_date` and
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * are the same and in
+       *     the future relative to UTC, the transfer is executed only one time.
+       * *   If `schedule_end_date` is later than `schedule_start_date`  and
+       *     `schedule_end_date` is in the future relative to UTC, the job will
+       *     run each day at
+       *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       *     through `schedule_end_date`.
+       * 
+ * + * .google.type.Date schedule_end_date = 2; + * + * @return The scheduleEndDate. + */ + public com.google.type.Date getScheduleEndDate() { + if (scheduleEndDateBuilder_ == null) { + return scheduleEndDate_ == null + ? com.google.type.Date.getDefaultInstance() + : scheduleEndDate_; + } else { + return scheduleEndDateBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The last day a transfer runs. Date boundaries are determined relative to
+       * UTC time. A job will run once per 24 hours within the following guidelines:
+       * *   If `schedule_end_date` and
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * are the same and in
+       *     the future relative to UTC, the transfer is executed only one time.
+       * *   If `schedule_end_date` is later than `schedule_start_date`  and
+       *     `schedule_end_date` is in the future relative to UTC, the job will
+       *     run each day at
+       *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       *     through `schedule_end_date`.
+       * 
+ * + * .google.type.Date schedule_end_date = 2; + */ + public Builder setScheduleEndDate(com.google.type.Date value) { + if (scheduleEndDateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduleEndDate_ = value; + onChanged(); + } else { + scheduleEndDateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The last day a transfer runs. Date boundaries are determined relative to
+       * UTC time. A job will run once per 24 hours within the following guidelines:
+       * *   If `schedule_end_date` and
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * are the same and in
+       *     the future relative to UTC, the transfer is executed only one time.
+       * *   If `schedule_end_date` is later than `schedule_start_date`  and
+       *     `schedule_end_date` is in the future relative to UTC, the job will
+       *     run each day at
+       *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       *     through `schedule_end_date`.
+       * 
+ * + * .google.type.Date schedule_end_date = 2; + */ + public Builder setScheduleEndDate(com.google.type.Date.Builder builderForValue) { + if (scheduleEndDateBuilder_ == null) { + scheduleEndDate_ = builderForValue.build(); + onChanged(); + } else { + scheduleEndDateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The last day a transfer runs. Date boundaries are determined relative to
+       * UTC time. A job will run once per 24 hours within the following guidelines:
+       * *   If `schedule_end_date` and
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * are the same and in
+       *     the future relative to UTC, the transfer is executed only one time.
+       * *   If `schedule_end_date` is later than `schedule_start_date`  and
+       *     `schedule_end_date` is in the future relative to UTC, the job will
+       *     run each day at
+       *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       *     through `schedule_end_date`.
+       * 
+ * + * .google.type.Date schedule_end_date = 2; + */ + public Builder mergeScheduleEndDate(com.google.type.Date value) { + if (scheduleEndDateBuilder_ == null) { + if (scheduleEndDate_ != null) { + scheduleEndDate_ = + com.google.type.Date.newBuilder(scheduleEndDate_).mergeFrom(value).buildPartial(); + } else { + scheduleEndDate_ = value; + } + onChanged(); + } else { + scheduleEndDateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The last day a transfer runs. Date boundaries are determined relative to
+       * UTC time. A job will run once per 24 hours within the following guidelines:
+       * *   If `schedule_end_date` and
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * are the same and in
+       *     the future relative to UTC, the transfer is executed only one time.
+       * *   If `schedule_end_date` is later than `schedule_start_date`  and
+       *     `schedule_end_date` is in the future relative to UTC, the job will
+       *     run each day at
+       *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       *     through `schedule_end_date`.
+       * 
+ * + * .google.type.Date schedule_end_date = 2; + */ + public Builder clearScheduleEndDate() { + if (scheduleEndDateBuilder_ == null) { + scheduleEndDate_ = null; + onChanged(); + } else { + scheduleEndDate_ = null; + scheduleEndDateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The last day a transfer runs. Date boundaries are determined relative to
+       * UTC time. A job will run once per 24 hours within the following guidelines:
+       * *   If `schedule_end_date` and
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * are the same and in
+       *     the future relative to UTC, the transfer is executed only one time.
+       * *   If `schedule_end_date` is later than `schedule_start_date`  and
+       *     `schedule_end_date` is in the future relative to UTC, the job will
+       *     run each day at
+       *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       *     through `schedule_end_date`.
+       * 
+ * + * .google.type.Date schedule_end_date = 2; + */ + public com.google.type.Date.Builder getScheduleEndDateBuilder() { + + onChanged(); + return getScheduleEndDateFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The last day a transfer runs. Date boundaries are determined relative to
+       * UTC time. A job will run once per 24 hours within the following guidelines:
+       * *   If `schedule_end_date` and
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * are the same and in
+       *     the future relative to UTC, the transfer is executed only one time.
+       * *   If `schedule_end_date` is later than `schedule_start_date`  and
+       *     `schedule_end_date` is in the future relative to UTC, the job will
+       *     run each day at
+       *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       *     through `schedule_end_date`.
+       * 
+ * + * .google.type.Date schedule_end_date = 2; + */ + public com.google.type.DateOrBuilder getScheduleEndDateOrBuilder() { + if (scheduleEndDateBuilder_ != null) { + return scheduleEndDateBuilder_.getMessageOrBuilder(); + } else { + return scheduleEndDate_ == null + ? com.google.type.Date.getDefaultInstance() + : scheduleEndDate_; + } + } + /** + * + * + *
+       * The last day a transfer runs. Date boundaries are determined relative to
+       * UTC time. A job will run once per 24 hours within the following guidelines:
+       * *   If `schedule_end_date` and
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * are the same and in
+       *     the future relative to UTC, the transfer is executed only one time.
+       * *   If `schedule_end_date` is later than `schedule_start_date`  and
+       *     `schedule_end_date` is in the future relative to UTC, the job will
+       *     run each day at
+       *     [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day]
+       *     through `schedule_end_date`.
+       * 
+ * + * .google.type.Date schedule_end_date = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> + getScheduleEndDateFieldBuilder() { + if (scheduleEndDateBuilder_ == null) { + scheduleEndDateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Date, + com.google.type.Date.Builder, + com.google.type.DateOrBuilder>( + getScheduleEndDate(), getParentForChildren(), isClean()); + scheduleEndDate_ = null; + } + return scheduleEndDateBuilder_; + } + + private com.google.type.TimeOfDay startTimeOfDay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + startTimeOfDayBuilder_; + /** + * + * + *
+       * The time in UTC that a transfer job is scheduled to run. Transfers may
+       * start later than this time.
+       * If `start_time_of_day` is not specified:
+       * *   One-time transfers run immediately.
+       * *   Recurring transfers run immediately, and each day at midnight UTC,
+       *     through
+       *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+       * If `start_time_of_day` is specified:
+       * *   One-time transfers run at the specified time.
+       * *   Recurring transfers run at the specified time each day, through
+       *     `schedule_end_date`.
+       * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + * + * @return Whether the startTimeOfDay field is set. + */ + public boolean hasStartTimeOfDay() { + return startTimeOfDayBuilder_ != null || startTimeOfDay_ != null; + } + /** + * + * + *
+       * The time in UTC that a transfer job is scheduled to run. Transfers may
+       * start later than this time.
+       * If `start_time_of_day` is not specified:
+       * *   One-time transfers run immediately.
+       * *   Recurring transfers run immediately, and each day at midnight UTC,
+       *     through
+       *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+       * If `start_time_of_day` is specified:
+       * *   One-time transfers run at the specified time.
+       * *   Recurring transfers run at the specified time each day, through
+       *     `schedule_end_date`.
+       * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + * + * @return The startTimeOfDay. + */ + public com.google.type.TimeOfDay getStartTimeOfDay() { + if (startTimeOfDayBuilder_ == null) { + return startTimeOfDay_ == null + ? com.google.type.TimeOfDay.getDefaultInstance() + : startTimeOfDay_; + } else { + return startTimeOfDayBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The time in UTC that a transfer job is scheduled to run. Transfers may
+       * start later than this time.
+       * If `start_time_of_day` is not specified:
+       * *   One-time transfers run immediately.
+       * *   Recurring transfers run immediately, and each day at midnight UTC,
+       *     through
+       *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+       * If `start_time_of_day` is specified:
+       * *   One-time transfers run at the specified time.
+       * *   Recurring transfers run at the specified time each day, through
+       *     `schedule_end_date`.
+       * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + */ + public Builder setStartTimeOfDay(com.google.type.TimeOfDay value) { + if (startTimeOfDayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTimeOfDay_ = value; + onChanged(); + } else { + startTimeOfDayBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The time in UTC that a transfer job is scheduled to run. Transfers may
+       * start later than this time.
+       * If `start_time_of_day` is not specified:
+       * *   One-time transfers run immediately.
+       * *   Recurring transfers run immediately, and each day at midnight UTC,
+       *     through
+       *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+       * If `start_time_of_day` is specified:
+       * *   One-time transfers run at the specified time.
+       * *   Recurring transfers run at the specified time each day, through
+       *     `schedule_end_date`.
+       * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + */ + public Builder setStartTimeOfDay(com.google.type.TimeOfDay.Builder builderForValue) { + if (startTimeOfDayBuilder_ == null) { + startTimeOfDay_ = builderForValue.build(); + onChanged(); + } else { + startTimeOfDayBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The time in UTC that a transfer job is scheduled to run. Transfers may
+       * start later than this time.
+       * If `start_time_of_day` is not specified:
+       * *   One-time transfers run immediately.
+       * *   Recurring transfers run immediately, and each day at midnight UTC,
+       *     through
+       *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+       * If `start_time_of_day` is specified:
+       * *   One-time transfers run at the specified time.
+       * *   Recurring transfers run at the specified time each day, through
+       *     `schedule_end_date`.
+       * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + */ + public Builder mergeStartTimeOfDay(com.google.type.TimeOfDay value) { + if (startTimeOfDayBuilder_ == null) { + if (startTimeOfDay_ != null) { + startTimeOfDay_ = + com.google.type.TimeOfDay.newBuilder(startTimeOfDay_) + .mergeFrom(value) + .buildPartial(); + } else { + startTimeOfDay_ = value; + } + onChanged(); + } else { + startTimeOfDayBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The time in UTC that a transfer job is scheduled to run. Transfers may
+       * start later than this time.
+       * If `start_time_of_day` is not specified:
+       * *   One-time transfers run immediately.
+       * *   Recurring transfers run immediately, and each day at midnight UTC,
+       *     through
+       *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+       * If `start_time_of_day` is specified:
+       * *   One-time transfers run at the specified time.
+       * *   Recurring transfers run at the specified time each day, through
+       *     `schedule_end_date`.
+       * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + */ + public Builder clearStartTimeOfDay() { + if (startTimeOfDayBuilder_ == null) { + startTimeOfDay_ = null; + onChanged(); + } else { + startTimeOfDay_ = null; + startTimeOfDayBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The time in UTC that a transfer job is scheduled to run. Transfers may
+       * start later than this time.
+       * If `start_time_of_day` is not specified:
+       * *   One-time transfers run immediately.
+       * *   Recurring transfers run immediately, and each day at midnight UTC,
+       *     through
+       *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+       * If `start_time_of_day` is specified:
+       * *   One-time transfers run at the specified time.
+       * *   Recurring transfers run at the specified time each day, through
+       *     `schedule_end_date`.
+       * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + */ + public com.google.type.TimeOfDay.Builder getStartTimeOfDayBuilder() { + + onChanged(); + return getStartTimeOfDayFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The time in UTC that a transfer job is scheduled to run. Transfers may
+       * start later than this time.
+       * If `start_time_of_day` is not specified:
+       * *   One-time transfers run immediately.
+       * *   Recurring transfers run immediately, and each day at midnight UTC,
+       *     through
+       *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+       * If `start_time_of_day` is specified:
+       * *   One-time transfers run at the specified time.
+       * *   Recurring transfers run at the specified time each day, through
+       *     `schedule_end_date`.
+       * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + */ + public com.google.type.TimeOfDayOrBuilder getStartTimeOfDayOrBuilder() { + if (startTimeOfDayBuilder_ != null) { + return startTimeOfDayBuilder_.getMessageOrBuilder(); + } else { + return startTimeOfDay_ == null + ? com.google.type.TimeOfDay.getDefaultInstance() + : startTimeOfDay_; + } + } + /** + * + * + *
+       * The time in UTC that a transfer job is scheduled to run. Transfers may
+       * start later than this time.
+       * If `start_time_of_day` is not specified:
+       * *   One-time transfers run immediately.
+       * *   Recurring transfers run immediately, and each day at midnight UTC,
+       *     through
+       *     [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date].
+       * If `start_time_of_day` is specified:
+       * *   One-time transfers run at the specified time.
+       * *   Recurring transfers run at the specified time each day, through
+       *     `schedule_end_date`.
+       * 
+ * + * .google.type.TimeOfDay start_time_of_day = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + getStartTimeOfDayFieldBuilder() { + if (startTimeOfDayBuilder_ == null) { + startTimeOfDayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder>( + getStartTimeOfDay(), getParentForChildren(), isClean()); + startTimeOfDay_ = null; + } + return startTimeOfDayBuilder_; + } + + private com.google.type.TimeOfDay endTimeOfDay_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + endTimeOfDayBuilder_; + /** + * + * + *
+       * The time in UTC that no further transfer operations are scheduled. Combined
+       * with
+       * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+       * `end_time_of_day` specifies the end date and time for starting new transfer
+       * operations. This field must be greater than or equal to the timestamp
+       * corresponding to the combintation of
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+       * and is subject to the following:
+       * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+       *     a default value of `23:59:59` is used for `end_time_of_day`.
+       * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+       *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+       * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + * + * @return Whether the endTimeOfDay field is set. + */ + public boolean hasEndTimeOfDay() { + return endTimeOfDayBuilder_ != null || endTimeOfDay_ != null; + } + /** + * + * + *
+       * The time in UTC that no further transfer operations are scheduled. Combined
+       * with
+       * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+       * `end_time_of_day` specifies the end date and time for starting new transfer
+       * operations. This field must be greater than or equal to the timestamp
+       * corresponding to the combintation of
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+       * and is subject to the following:
+       * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+       *     a default value of `23:59:59` is used for `end_time_of_day`.
+       * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+       *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+       * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + * + * @return The endTimeOfDay. + */ + public com.google.type.TimeOfDay getEndTimeOfDay() { + if (endTimeOfDayBuilder_ == null) { + return endTimeOfDay_ == null + ? com.google.type.TimeOfDay.getDefaultInstance() + : endTimeOfDay_; + } else { + return endTimeOfDayBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The time in UTC that no further transfer operations are scheduled. Combined
+       * with
+       * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+       * `end_time_of_day` specifies the end date and time for starting new transfer
+       * operations. This field must be greater than or equal to the timestamp
+       * corresponding to the combintation of
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+       * and is subject to the following:
+       * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+       *     a default value of `23:59:59` is used for `end_time_of_day`.
+       * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+       *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+       * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + */ + public Builder setEndTimeOfDay(com.google.type.TimeOfDay value) { + if (endTimeOfDayBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTimeOfDay_ = value; + onChanged(); + } else { + endTimeOfDayBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The time in UTC that no further transfer operations are scheduled. Combined
+       * with
+       * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+       * `end_time_of_day` specifies the end date and time for starting new transfer
+       * operations. This field must be greater than or equal to the timestamp
+       * corresponding to the combintation of
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+       * and is subject to the following:
+       * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+       *     a default value of `23:59:59` is used for `end_time_of_day`.
+       * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+       *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+       * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + */ + public Builder setEndTimeOfDay(com.google.type.TimeOfDay.Builder builderForValue) { + if (endTimeOfDayBuilder_ == null) { + endTimeOfDay_ = builderForValue.build(); + onChanged(); + } else { + endTimeOfDayBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The time in UTC that no further transfer operations are scheduled. Combined
+       * with
+       * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+       * `end_time_of_day` specifies the end date and time for starting new transfer
+       * operations. This field must be greater than or equal to the timestamp
+       * corresponding to the combintation of
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+       * and is subject to the following:
+       * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+       *     a default value of `23:59:59` is used for `end_time_of_day`.
+       * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+       *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+       * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + */ + public Builder mergeEndTimeOfDay(com.google.type.TimeOfDay value) { + if (endTimeOfDayBuilder_ == null) { + if (endTimeOfDay_ != null) { + endTimeOfDay_ = + com.google.type.TimeOfDay.newBuilder(endTimeOfDay_).mergeFrom(value).buildPartial(); + } else { + endTimeOfDay_ = value; + } + onChanged(); + } else { + endTimeOfDayBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The time in UTC that no further transfer operations are scheduled. Combined
+       * with
+       * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+       * `end_time_of_day` specifies the end date and time for starting new transfer
+       * operations. This field must be greater than or equal to the timestamp
+       * corresponding to the combintation of
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+       * and is subject to the following:
+       * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+       *     a default value of `23:59:59` is used for `end_time_of_day`.
+       * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+       *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+       * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + */ + public Builder clearEndTimeOfDay() { + if (endTimeOfDayBuilder_ == null) { + endTimeOfDay_ = null; + onChanged(); + } else { + endTimeOfDay_ = null; + endTimeOfDayBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The time in UTC that no further transfer operations are scheduled. Combined
+       * with
+       * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+       * `end_time_of_day` specifies the end date and time for starting new transfer
+       * operations. This field must be greater than or equal to the timestamp
+       * corresponding to the combintation of
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+       * and is subject to the following:
+       * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+       *     a default value of `23:59:59` is used for `end_time_of_day`.
+       * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+       *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+       * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + */ + public com.google.type.TimeOfDay.Builder getEndTimeOfDayBuilder() { + + onChanged(); + return getEndTimeOfDayFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The time in UTC that no further transfer operations are scheduled. Combined
+       * with
+       * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+       * `end_time_of_day` specifies the end date and time for starting new transfer
+       * operations. This field must be greater than or equal to the timestamp
+       * corresponding to the combintation of
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+       * and is subject to the following:
+       * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+       *     a default value of `23:59:59` is used for `end_time_of_day`.
+       * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+       *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+       * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + */ + public com.google.type.TimeOfDayOrBuilder getEndTimeOfDayOrBuilder() { + if (endTimeOfDayBuilder_ != null) { + return endTimeOfDayBuilder_.getMessageOrBuilder(); + } else { + return endTimeOfDay_ == null + ? com.google.type.TimeOfDay.getDefaultInstance() + : endTimeOfDay_; + } + } + /** + * + * + *
+       * The time in UTC that no further transfer operations are scheduled. Combined
+       * with
+       * [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date],
+       * `end_time_of_day` specifies the end date and time for starting new transfer
+       * operations. This field must be greater than or equal to the timestamp
+       * corresponding to the combintation of
+       * [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date]
+       * and
+       * [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day],
+       * and is subject to the following:
+       * *   If `end_time_of_day` is not set and `schedule_end_date` is set, then
+       *     a default value of `23:59:59` is used for `end_time_of_day`.
+       * *   If `end_time_of_day` is set and `schedule_end_date` is not set, then
+       *     [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned.
+       * 
+ * + * .google.type.TimeOfDay end_time_of_day = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder> + getEndTimeOfDayFieldBuilder() { + if (endTimeOfDayBuilder_ == null) { + endTimeOfDayBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.TimeOfDay, + com.google.type.TimeOfDay.Builder, + com.google.type.TimeOfDayOrBuilder>( + getEndTimeOfDay(), getParentForChildren(), isClean()); + endTimeOfDay_ = null; + } + return endTimeOfDayBuilder_; + } + + private com.google.protobuf.Duration repeatInterval_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + repeatIntervalBuilder_; + /** + * + * + *
+       * Interval between the start of each scheduled TransferOperation. If
+       * unspecified, the default value is 24 hours. This value may not be less than
+       * 1 hour.
+       * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + * + * @return Whether the repeatInterval field is set. + */ + public boolean hasRepeatInterval() { + return repeatIntervalBuilder_ != null || repeatInterval_ != null; + } + /** + * + * + *
+       * Interval between the start of each scheduled TransferOperation. If
+       * unspecified, the default value is 24 hours. This value may not be less than
+       * 1 hour.
+       * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + * + * @return The repeatInterval. + */ + public com.google.protobuf.Duration getRepeatInterval() { + if (repeatIntervalBuilder_ == null) { + return repeatInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : repeatInterval_; + } else { + return repeatIntervalBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Interval between the start of each scheduled TransferOperation. If
+       * unspecified, the default value is 24 hours. This value may not be less than
+       * 1 hour.
+       * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + */ + public Builder setRepeatInterval(com.google.protobuf.Duration value) { + if (repeatIntervalBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + repeatInterval_ = value; + onChanged(); + } else { + repeatIntervalBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Interval between the start of each scheduled TransferOperation. If
+       * unspecified, the default value is 24 hours. This value may not be less than
+       * 1 hour.
+       * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + */ + public Builder setRepeatInterval(com.google.protobuf.Duration.Builder builderForValue) { + if (repeatIntervalBuilder_ == null) { + repeatInterval_ = builderForValue.build(); + onChanged(); + } else { + repeatIntervalBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Interval between the start of each scheduled TransferOperation. If
+       * unspecified, the default value is 24 hours. This value may not be less than
+       * 1 hour.
+       * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + */ + public Builder mergeRepeatInterval(com.google.protobuf.Duration value) { + if (repeatIntervalBuilder_ == null) { + if (repeatInterval_ != null) { + repeatInterval_ = + com.google.protobuf.Duration.newBuilder(repeatInterval_) + .mergeFrom(value) + .buildPartial(); + } else { + repeatInterval_ = value; + } + onChanged(); + } else { + repeatIntervalBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Interval between the start of each scheduled TransferOperation. If
+       * unspecified, the default value is 24 hours. This value may not be less than
+       * 1 hour.
+       * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + */ + public Builder clearRepeatInterval() { + if (repeatIntervalBuilder_ == null) { + repeatInterval_ = null; + onChanged(); + } else { + repeatInterval_ = null; + repeatIntervalBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Interval between the start of each scheduled TransferOperation. If
+       * unspecified, the default value is 24 hours. This value may not be less than
+       * 1 hour.
+       * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + */ + public com.google.protobuf.Duration.Builder getRepeatIntervalBuilder() { + + onChanged(); + return getRepeatIntervalFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Interval between the start of each scheduled TransferOperation. If
+       * unspecified, the default value is 24 hours. This value may not be less than
+       * 1 hour.
+       * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + */ + public com.google.protobuf.DurationOrBuilder getRepeatIntervalOrBuilder() { + if (repeatIntervalBuilder_ != null) { + return repeatIntervalBuilder_.getMessageOrBuilder(); + } else { + return repeatInterval_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : repeatInterval_; + } + } + /** + * + * + *
+       * Interval between the start of each scheduled TransferOperation. If
+       * unspecified, the default value is 24 hours. This value may not be less than
+       * 1 hour.
+       * 
+ * + * .google.protobuf.Duration repeat_interval = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getRepeatIntervalFieldBuilder() { + if (repeatIntervalBuilder_ == null) { + repeatIntervalBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getRepeatInterval(), getParentForChildren(), isClean()); + repeatInterval_ = null; + } + return repeatIntervalBuilder_; + } + + @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.storagetransfer.v1.Schedule) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.Schedule) + private static final com.google.storagetransfer.v1.proto.TransferTypes.Schedule + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.Schedule(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.Schedule getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Schedule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Schedule(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.storagetransfer.v1.proto.TransferTypes.Schedule getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TransferJobOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.TransferJob) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A unique name (within the transfer project) assigned when the job is
+     * created.  If this field is empty in a CreateTransferJobRequest, Storage
+     * Transfer Service will assign a unique name. Otherwise, the specified name
+     * is used as the unique name for this job.
+     * If the specified name is in use by a job, the creation request fails with
+     * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
+     * This name must start with `"transferJobs/"` prefix and end with a letter or
+     * a number, and should be no more than 128 characters. This name must not
+     * start with 'transferJobs/OPI'. 'transferJobs/OPI' is a reserved prefix.
+     * Example:
+     * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"`
+     * Invalid job names will fail with an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * A unique name (within the transfer project) assigned when the job is
+     * created.  If this field is empty in a CreateTransferJobRequest, Storage
+     * Transfer Service will assign a unique name. Otherwise, the specified name
+     * is used as the unique name for this job.
+     * If the specified name is in use by a job, the creation request fails with
+     * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
+     * This name must start with `"transferJobs/"` prefix and end with a letter or
+     * a number, and should be no more than 128 characters. This name must not
+     * start with 'transferJobs/OPI'. 'transferJobs/OPI' is a reserved prefix.
+     * Example:
+     * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"`
+     * Invalid job names will fail with an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * A description provided by the user for the job. Its max length is 1024
+     * bytes when Unicode-encoded.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * A description provided by the user for the job. Its max length is 1024
+     * bytes when Unicode-encoded.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * The ID of the Google Cloud Platform Project that owns the job.
+     * 
+ * + * string project_id = 3; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+     * The ID of the Google Cloud Platform Project that owns the job.
+     * 
+ * + * string project_id = 3; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+     * Transfer specification.
+     * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + * + * @return Whether the transferSpec field is set. + */ + boolean hasTransferSpec(); + /** + * + * + *
+     * Transfer specification.
+     * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + * + * @return The transferSpec. + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec getTransferSpec(); + /** + * + * + *
+     * Transfer specification.
+     * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder + getTransferSpecOrBuilder(); + + /** + * + * + *
+     * Notification configuration.
+     * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + * + * @return Whether the notificationConfig field is set. + */ + boolean hasNotificationConfig(); + /** + * + * + *
+     * Notification configuration.
+     * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + * + * @return The notificationConfig. + */ + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig getNotificationConfig(); + /** + * + * + *
+     * Notification configuration.
+     * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + */ + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder + getNotificationConfigOrBuilder(); + + /** + * + * + *
+     * Specifies schedule for the transfer job.
+     * This is an optional field. When the field is not set, the job will never
+     * execute a transfer, unless you invoke RunTransferJob or update the job to
+     * have a non-empty schedule.
+     * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + * + * @return Whether the schedule field is set. + */ + boolean hasSchedule(); + /** + * + * + *
+     * Specifies schedule for the transfer job.
+     * This is an optional field. When the field is not set, the job will never
+     * execute a transfer, unless you invoke RunTransferJob or update the job to
+     * have a non-empty schedule.
+     * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + * + * @return The schedule. + */ + com.google.storagetransfer.v1.proto.TransferTypes.Schedule getSchedule(); + /** + * + * + *
+     * Specifies schedule for the transfer job.
+     * This is an optional field. When the field is not set, the job will never
+     * execute a transfer, unless you invoke RunTransferJob or update the job to
+     * have a non-empty schedule.
+     * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + */ + com.google.storagetransfer.v1.proto.TransferTypes.ScheduleOrBuilder getScheduleOrBuilder(); + + /** + * + * + *
+     * Status of the job. This value MUST be specified for
+     * `CreateTransferJobRequests`.
+     * **Note:** The effect of the new job status takes place during a subsequent
+     * job run. For example, if you change the job status from
+     * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to
+     * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an
+     * operation spawned by the transfer is running, the status change would not
+     * affect the current operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferJob.Status status = 6; + * + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * + * + *
+     * Status of the job. This value MUST be specified for
+     * `CreateTransferJobRequests`.
+     * **Note:** The effect of the new job status takes place during a subsequent
+     * job run. For example, if you change the job status from
+     * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to
+     * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an
+     * operation spawned by the transfer is running, the status change would not
+     * affect the current operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferJob.Status status = 6; + * + * @return The status. + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Status getStatus(); + + /** + * + * + *
+     * Output only. The time that the transfer job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the creationTime field is set. + */ + boolean hasCreationTime(); + /** + * + * + *
+     * Output only. The time that the transfer job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The creationTime. + */ + com.google.protobuf.Timestamp getCreationTime(); + /** + * + * + *
+     * Output only. The time that the transfer job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder(); + + /** + * + * + *
+     * Output only. The time that the transfer job was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastModificationTime field is set. + */ + boolean hasLastModificationTime(); + /** + * + * + *
+     * Output only. The time that the transfer job was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastModificationTime. + */ + com.google.protobuf.Timestamp getLastModificationTime(); + /** + * + * + *
+     * Output only. The time that the transfer job was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastModificationTimeOrBuilder(); + + /** + * + * + *
+     * Output only. The time that the transfer job was deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deletionTime field is set. + */ + boolean hasDeletionTime(); + /** + * + * + *
+     * Output only. The time that the transfer job was deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deletionTime. + */ + com.google.protobuf.Timestamp getDeletionTime(); + /** + * + * + *
+     * Output only. The time that the transfer job was deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getDeletionTimeOrBuilder(); + + /** + * + * + *
+     * The name of the most recently started TransferOperation of this JobConfig.
+     * Present if a TransferOperation has been created for this JobConfig.
+     * 
+ * + * string latest_operation_name = 12; + * + * @return The latestOperationName. + */ + java.lang.String getLatestOperationName(); + /** + * + * + *
+     * The name of the most recently started TransferOperation of this JobConfig.
+     * Present if a TransferOperation has been created for this JobConfig.
+     * 
+ * + * string latest_operation_name = 12; + * + * @return The bytes for latestOperationName. + */ + com.google.protobuf.ByteString getLatestOperationNameBytes(); + } + /** + * + * + *
+   * This resource represents the configuration of a transfer job that runs
+   * periodically.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.TransferJob} + */ + public static final class TransferJob extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.TransferJob) + TransferJobOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransferJob.newBuilder() to construct. + private TransferJob(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransferJob() { + name_ = ""; + description_ = ""; + projectId_ = ""; + status_ = 0; + latestOperationName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransferJob(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransferJob( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 34: + { + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder subBuilder = + null; + if (transferSpec_ != null) { + subBuilder = transferSpec_.toBuilder(); + } + transferSpec_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transferSpec_); + transferSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.storagetransfer.v1.proto.TransferTypes.Schedule.Builder subBuilder = + null; + if (schedule_ != null) { + subBuilder = schedule_.toBuilder(); + } + schedule_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.Schedule.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(schedule_); + schedule_ = subBuilder.buildPartial(); + } + + break; + } + case 48: + { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (creationTime_ != null) { + subBuilder = creationTime_.toBuilder(); + } + creationTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(creationTime_); + creationTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (lastModificationTime_ != null) { + subBuilder = lastModificationTime_.toBuilder(); + } + lastModificationTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastModificationTime_); + lastModificationTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (deletionTime_ != null) { + subBuilder = deletionTime_.toBuilder(); + } + deletionTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(deletionTime_); + deletionTime_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder + subBuilder = null; + if (notificationConfig_ != null) { + subBuilder = notificationConfig_.toBuilder(); + } + notificationConfig_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(notificationConfig_); + notificationConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + latestOperationName_ = 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.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.class, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder.class); + } + + /** + * + * + *
+     * The status of the transfer job.
+     * 
+ * + * Protobuf enum {@code google.storagetransfer.v1.TransferJob.Status} + */ + public enum Status implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Zero is an illegal value.
+       * 
+ * + * STATUS_UNSPECIFIED = 0; + */ + STATUS_UNSPECIFIED(0), + /** + * + * + *
+       * New transfers will be performed based on the schedule.
+       * 
+ * + * ENABLED = 1; + */ + ENABLED(1), + /** + * + * + *
+       * New transfers will not be scheduled.
+       * 
+ * + * DISABLED = 2; + */ + DISABLED(2), + /** + * + * + *
+       * This is a soft delete state. After a transfer job is set to this
+       * state, the job and all the transfer executions are subject to
+       * garbage collection. Transfer jobs become eligible for garbage collection
+       * 30 days after their status is set to `DELETED`.
+       * 
+ * + * DELETED = 3; + */ + DELETED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Zero is an illegal value.
+       * 
+ * + * STATUS_UNSPECIFIED = 0; + */ + public static final int STATUS_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * New transfers will be performed based on the schedule.
+       * 
+ * + * ENABLED = 1; + */ + public static final int ENABLED_VALUE = 1; + /** + * + * + *
+       * New transfers will not be scheduled.
+       * 
+ * + * DISABLED = 2; + */ + public static final int DISABLED_VALUE = 2; + /** + * + * + *
+       * This is a soft delete state. After a transfer job is set to this
+       * state, the job and all the transfer executions are subject to
+       * garbage collection. Transfer jobs become eligible for garbage collection
+       * 30 days after their status is set to `DELETED`.
+       * 
+ * + * DELETED = 3; + */ + public static final int DELETED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Status valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Status forNumber(int value) { + switch (value) { + case 0: + return STATUS_UNSPECIFIED; + case 1: + return ENABLED; + case 2: + return DISABLED; + case 3: + return DELETED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Status findValueByNumber(int number) { + return Status.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Status[] VALUES = values(); + + public static Status valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Status(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.storagetransfer.v1.TransferJob.Status) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * A unique name (within the transfer project) assigned when the job is
+     * created.  If this field is empty in a CreateTransferJobRequest, Storage
+     * Transfer Service will assign a unique name. Otherwise, the specified name
+     * is used as the unique name for this job.
+     * If the specified name is in use by a job, the creation request fails with
+     * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
+     * This name must start with `"transferJobs/"` prefix and end with a letter or
+     * a number, and should be no more than 128 characters. This name must not
+     * start with 'transferJobs/OPI'. 'transferJobs/OPI' is a reserved prefix.
+     * Example:
+     * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"`
+     * Invalid job names will fail with an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * 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 unique name (within the transfer project) assigned when the job is
+     * created.  If this field is empty in a CreateTransferJobRequest, Storage
+     * Transfer Service will assign a unique name. Otherwise, the specified name
+     * is used as the unique name for this job.
+     * If the specified name is in use by a job, the creation request fails with
+     * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
+     * This name must start with `"transferJobs/"` prefix and end with a letter or
+     * a number, and should be no more than 128 characters. This name must not
+     * start with 'transferJobs/OPI'. 'transferJobs/OPI' is a reserved prefix.
+     * Example:
+     * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"`
+     * Invalid job names will fail with an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+     * A description provided by the user for the job. Its max length is 1024
+     * bytes when Unicode-encoded.
+     * 
+ * + * 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 description provided by the user for the job. Its max length is 1024
+     * bytes when Unicode-encoded.
+     * 
+ * + * 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 PROJECT_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object projectId_; + /** + * + * + *
+     * The ID of the Google Cloud Platform Project that owns the job.
+     * 
+ * + * string project_id = 3; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+     * The ID of the Google Cloud Platform Project that owns the job.
+     * 
+ * + * string project_id = 3; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSFER_SPEC_FIELD_NUMBER = 4; + private com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec transferSpec_; + /** + * + * + *
+     * Transfer specification.
+     * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + * + * @return Whether the transferSpec field is set. + */ + @java.lang.Override + public boolean hasTransferSpec() { + return transferSpec_ != null; + } + /** + * + * + *
+     * Transfer specification.
+     * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + * + * @return The transferSpec. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec getTransferSpec() { + return transferSpec_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.getDefaultInstance() + : transferSpec_; + } + /** + * + * + *
+     * Transfer specification.
+     * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder + getTransferSpecOrBuilder() { + return getTransferSpec(); + } + + public static final int NOTIFICATION_CONFIG_FIELD_NUMBER = 11; + private com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + notificationConfig_; + /** + * + * + *
+     * Notification configuration.
+     * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + * + * @return Whether the notificationConfig field is set. + */ + @java.lang.Override + public boolean hasNotificationConfig() { + return notificationConfig_ != null; + } + /** + * + * + *
+     * Notification configuration.
+     * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + * + * @return The notificationConfig. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + getNotificationConfig() { + return notificationConfig_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + .getDefaultInstance() + : notificationConfig_; + } + /** + * + * + *
+     * Notification configuration.
+     * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder + getNotificationConfigOrBuilder() { + return getNotificationConfig(); + } + + public static final int SCHEDULE_FIELD_NUMBER = 5; + private com.google.storagetransfer.v1.proto.TransferTypes.Schedule schedule_; + /** + * + * + *
+     * Specifies schedule for the transfer job.
+     * This is an optional field. When the field is not set, the job will never
+     * execute a transfer, unless you invoke RunTransferJob or update the job to
+     * have a non-empty schedule.
+     * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + * + * @return Whether the schedule field is set. + */ + @java.lang.Override + public boolean hasSchedule() { + return schedule_ != null; + } + /** + * + * + *
+     * Specifies schedule for the transfer job.
+     * This is an optional field. When the field is not set, the job will never
+     * execute a transfer, unless you invoke RunTransferJob or update the job to
+     * have a non-empty schedule.
+     * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + * + * @return The schedule. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.Schedule getSchedule() { + return schedule_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.Schedule.getDefaultInstance() + : schedule_; + } + /** + * + * + *
+     * Specifies schedule for the transfer job.
+     * This is an optional field. When the field is not set, the job will never
+     * execute a transfer, unless you invoke RunTransferJob or update the job to
+     * have a non-empty schedule.
+     * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ScheduleOrBuilder + getScheduleOrBuilder() { + return getSchedule(); + } + + public static final int STATUS_FIELD_NUMBER = 6; + private int status_; + /** + * + * + *
+     * Status of the job. This value MUST be specified for
+     * `CreateTransferJobRequests`.
+     * **Note:** The effect of the new job status takes place during a subsequent
+     * job run. For example, if you change the job status from
+     * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to
+     * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an
+     * operation spawned by the transfer is running, the status change would not
+     * affect the current operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferJob.Status status = 6; + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + /** + * + * + *
+     * Status of the job. This value MUST be specified for
+     * `CreateTransferJobRequests`.
+     * **Note:** The effect of the new job status takes place during a subsequent
+     * job run. For example, if you change the job status from
+     * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to
+     * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an
+     * operation spawned by the transfer is running, the status change would not
+     * affect the current operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferJob.Status status = 6; + * + * @return The status. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Status getStatus() { + @SuppressWarnings("deprecation") + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Status result = + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Status.valueOf(status_); + return result == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Status.UNRECOGNIZED + : result; + } + + public static final int CREATION_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp creationTime_; + /** + * + * + *
+     * Output only. The time that the transfer job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the creationTime field is set. + */ + @java.lang.Override + public boolean hasCreationTime() { + return creationTime_ != null; + } + /** + * + * + *
+     * Output only. The time that the transfer job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The creationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreationTime() { + return creationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : creationTime_; + } + /** + * + * + *
+     * Output only. The time that the transfer job was created.
+     * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { + return getCreationTime(); + } + + public static final int LAST_MODIFICATION_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp lastModificationTime_; + /** + * + * + *
+     * Output only. The time that the transfer job was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastModificationTime field is set. + */ + @java.lang.Override + public boolean hasLastModificationTime() { + return lastModificationTime_ != null; + } + /** + * + * + *
+     * Output only. The time that the transfer job was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastModificationTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastModificationTime() { + return lastModificationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastModificationTime_; + } + /** + * + * + *
+     * Output only. The time that the transfer job was last modified.
+     * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastModificationTimeOrBuilder() { + return getLastModificationTime(); + } + + public static final int DELETION_TIME_FIELD_NUMBER = 9; + private com.google.protobuf.Timestamp deletionTime_; + /** + * + * + *
+     * Output only. The time that the transfer job was deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deletionTime field is set. + */ + @java.lang.Override + public boolean hasDeletionTime() { + return deletionTime_ != null; + } + /** + * + * + *
+     * Output only. The time that the transfer job was deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deletionTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getDeletionTime() { + return deletionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deletionTime_; + } + /** + * + * + *
+     * Output only. The time that the transfer job was deleted.
+     * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getDeletionTimeOrBuilder() { + return getDeletionTime(); + } + + public static final int LATEST_OPERATION_NAME_FIELD_NUMBER = 12; + private volatile java.lang.Object latestOperationName_; + /** + * + * + *
+     * The name of the most recently started TransferOperation of this JobConfig.
+     * Present if a TransferOperation has been created for this JobConfig.
+     * 
+ * + * string latest_operation_name = 12; + * + * @return The latestOperationName. + */ + @java.lang.Override + public java.lang.String getLatestOperationName() { + java.lang.Object ref = latestOperationName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + latestOperationName_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the most recently started TransferOperation of this JobConfig.
+     * Present if a TransferOperation has been created for this JobConfig.
+     * 
+ * + * string latest_operation_name = 12; + * + * @return The bytes for latestOperationName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLatestOperationNameBytes() { + java.lang.Object ref = latestOperationName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + latestOperationName_ = 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 (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (!getProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, projectId_); + } + if (transferSpec_ != null) { + output.writeMessage(4, getTransferSpec()); + } + if (schedule_ != null) { + output.writeMessage(5, getSchedule()); + } + if (status_ + != com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Status.STATUS_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, status_); + } + if (creationTime_ != null) { + output.writeMessage(7, getCreationTime()); + } + if (lastModificationTime_ != null) { + output.writeMessage(8, getLastModificationTime()); + } + if (deletionTime_ != null) { + output.writeMessage(9, getDeletionTime()); + } + if (notificationConfig_ != null) { + output.writeMessage(11, getNotificationConfig()); + } + if (!getLatestOperationNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, latestOperationName_); + } + 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 (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (!getProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, projectId_); + } + if (transferSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTransferSpec()); + } + if (schedule_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSchedule()); + } + if (status_ + != com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Status.STATUS_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, status_); + } + if (creationTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreationTime()); + } + if (lastModificationTime_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getLastModificationTime()); + } + if (deletionTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getDeletionTime()); + } + if (notificationConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(11, getNotificationConfig()); + } + if (!getLatestOperationNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, latestOperationName_); + } + 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.storagetransfer.v1.proto.TransferTypes.TransferJob)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob other = + (com.google.storagetransfer.v1.proto.TransferTypes.TransferJob) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (hasTransferSpec() != other.hasTransferSpec()) return false; + if (hasTransferSpec()) { + if (!getTransferSpec().equals(other.getTransferSpec())) return false; + } + if (hasNotificationConfig() != other.hasNotificationConfig()) return false; + if (hasNotificationConfig()) { + if (!getNotificationConfig().equals(other.getNotificationConfig())) return false; + } + if (hasSchedule() != other.hasSchedule()) return false; + if (hasSchedule()) { + if (!getSchedule().equals(other.getSchedule())) return false; + } + if (status_ != other.status_) return false; + if (hasCreationTime() != other.hasCreationTime()) return false; + if (hasCreationTime()) { + if (!getCreationTime().equals(other.getCreationTime())) return false; + } + if (hasLastModificationTime() != other.hasLastModificationTime()) return false; + if (hasLastModificationTime()) { + if (!getLastModificationTime().equals(other.getLastModificationTime())) return false; + } + if (hasDeletionTime() != other.hasDeletionTime()) return false; + if (hasDeletionTime()) { + if (!getDeletionTime().equals(other.getDeletionTime())) return false; + } + if (!getLatestOperationName().equals(other.getLatestOperationName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + if (hasTransferSpec()) { + hash = (37 * hash) + TRANSFER_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getTransferSpec().hashCode(); + } + if (hasNotificationConfig()) { + hash = (37 * hash) + NOTIFICATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNotificationConfig().hashCode(); + } + if (hasSchedule()) { + hash = (37 * hash) + SCHEDULE_FIELD_NUMBER; + hash = (53 * hash) + getSchedule().hashCode(); + } + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + if (hasCreationTime()) { + hash = (37 * hash) + CREATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreationTime().hashCode(); + } + if (hasLastModificationTime()) { + hash = (37 * hash) + LAST_MODIFICATION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastModificationTime().hashCode(); + } + if (hasDeletionTime()) { + hash = (37 * hash) + DELETION_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDeletionTime().hashCode(); + } + hash = (37 * hash) + LATEST_OPERATION_NAME_FIELD_NUMBER; + hash = (53 * hash) + getLatestOperationName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferJob parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferJob parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferJob parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferJob 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.storagetransfer.v1.proto.TransferTypes.TransferJob parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferJob parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferJob parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferJob 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.storagetransfer.v1.proto.TransferTypes.TransferJob parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferJob 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.storagetransfer.v1.proto.TransferTypes.TransferJob parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferJob 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.storagetransfer.v1.proto.TransferTypes.TransferJob 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; + } + /** + * + * + *
+     * This resource represents the configuration of a transfer job that runs
+     * periodically.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.TransferJob} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.TransferJob) + com.google.storagetransfer.v1.proto.TransferTypes.TransferJobOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferJob_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferJob_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.class, + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Builder.class); + } + + // Construct using com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + projectId_ = ""; + + if (transferSpecBuilder_ == null) { + transferSpec_ = null; + } else { + transferSpec_ = null; + transferSpecBuilder_ = null; + } + if (notificationConfigBuilder_ == null) { + notificationConfig_ = null; + } else { + notificationConfig_ = null; + notificationConfigBuilder_ = null; + } + if (scheduleBuilder_ == null) { + schedule_ = null; + } else { + schedule_ = null; + scheduleBuilder_ = null; + } + status_ = 0; + + if (creationTimeBuilder_ == null) { + creationTime_ = null; + } else { + creationTime_ = null; + creationTimeBuilder_ = null; + } + if (lastModificationTimeBuilder_ == null) { + lastModificationTime_ = null; + } else { + lastModificationTime_ = null; + lastModificationTimeBuilder_ = null; + } + if (deletionTimeBuilder_ == null) { + deletionTime_ = null; + } else { + deletionTime_ = null; + deletionTimeBuilder_ = null; + } + latestOperationName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferJob_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob build() { + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob result = + new com.google.storagetransfer.v1.proto.TransferTypes.TransferJob(this); + result.name_ = name_; + result.description_ = description_; + result.projectId_ = projectId_; + if (transferSpecBuilder_ == null) { + result.transferSpec_ = transferSpec_; + } else { + result.transferSpec_ = transferSpecBuilder_.build(); + } + if (notificationConfigBuilder_ == null) { + result.notificationConfig_ = notificationConfig_; + } else { + result.notificationConfig_ = notificationConfigBuilder_.build(); + } + if (scheduleBuilder_ == null) { + result.schedule_ = schedule_; + } else { + result.schedule_ = scheduleBuilder_.build(); + } + result.status_ = status_; + if (creationTimeBuilder_ == null) { + result.creationTime_ = creationTime_; + } else { + result.creationTime_ = creationTimeBuilder_.build(); + } + if (lastModificationTimeBuilder_ == null) { + result.lastModificationTime_ = lastModificationTime_; + } else { + result.lastModificationTime_ = lastModificationTimeBuilder_.build(); + } + if (deletionTimeBuilder_ == null) { + result.deletionTime_ = deletionTime_; + } else { + result.deletionTime_ = deletionTimeBuilder_.build(); + } + result.latestOperationName_ = latestOperationName_; + 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.storagetransfer.v1.proto.TransferTypes.TransferJob) { + return mergeFrom((com.google.storagetransfer.v1.proto.TransferTypes.TransferJob) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + if (other.hasTransferSpec()) { + mergeTransferSpec(other.getTransferSpec()); + } + if (other.hasNotificationConfig()) { + mergeNotificationConfig(other.getNotificationConfig()); + } + if (other.hasSchedule()) { + mergeSchedule(other.getSchedule()); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + if (other.hasCreationTime()) { + mergeCreationTime(other.getCreationTime()); + } + if (other.hasLastModificationTime()) { + mergeLastModificationTime(other.getLastModificationTime()); + } + if (other.hasDeletionTime()) { + mergeDeletionTime(other.getDeletionTime()); + } + if (!other.getLatestOperationName().isEmpty()) { + latestOperationName_ = other.latestOperationName_; + 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.storagetransfer.v1.proto.TransferTypes.TransferJob parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.TransferJob) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * A unique name (within the transfer project) assigned when the job is
+       * created.  If this field is empty in a CreateTransferJobRequest, Storage
+       * Transfer Service will assign a unique name. Otherwise, the specified name
+       * is used as the unique name for this job.
+       * If the specified name is in use by a job, the creation request fails with
+       * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
+       * This name must start with `"transferJobs/"` prefix and end with a letter or
+       * a number, and should be no more than 128 characters. This name must not
+       * start with 'transferJobs/OPI'. 'transferJobs/OPI' is a reserved prefix.
+       * Example:
+       * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"`
+       * Invalid job names will fail with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * 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 unique name (within the transfer project) assigned when the job is
+       * created.  If this field is empty in a CreateTransferJobRequest, Storage
+       * Transfer Service will assign a unique name. Otherwise, the specified name
+       * is used as the unique name for this job.
+       * If the specified name is in use by a job, the creation request fails with
+       * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
+       * This name must start with `"transferJobs/"` prefix and end with a letter or
+       * a number, and should be no more than 128 characters. This name must not
+       * start with 'transferJobs/OPI'. 'transferJobs/OPI' is a reserved prefix.
+       * Example:
+       * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"`
+       * Invalid job names will fail with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * 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 unique name (within the transfer project) assigned when the job is
+       * created.  If this field is empty in a CreateTransferJobRequest, Storage
+       * Transfer Service will assign a unique name. Otherwise, the specified name
+       * is used as the unique name for this job.
+       * If the specified name is in use by a job, the creation request fails with
+       * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
+       * This name must start with `"transferJobs/"` prefix and end with a letter or
+       * a number, and should be no more than 128 characters. This name must not
+       * start with 'transferJobs/OPI'. 'transferJobs/OPI' is a reserved prefix.
+       * Example:
+       * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"`
+       * Invalid job names will fail with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * 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 unique name (within the transfer project) assigned when the job is
+       * created.  If this field is empty in a CreateTransferJobRequest, Storage
+       * Transfer Service will assign a unique name. Otherwise, the specified name
+       * is used as the unique name for this job.
+       * If the specified name is in use by a job, the creation request fails with
+       * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
+       * This name must start with `"transferJobs/"` prefix and end with a letter or
+       * a number, and should be no more than 128 characters. This name must not
+       * start with 'transferJobs/OPI'. 'transferJobs/OPI' is a reserved prefix.
+       * Example:
+       * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"`
+       * Invalid job names will fail with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * A unique name (within the transfer project) assigned when the job is
+       * created.  If this field is empty in a CreateTransferJobRequest, Storage
+       * Transfer Service will assign a unique name. Otherwise, the specified name
+       * is used as the unique name for this job.
+       * If the specified name is in use by a job, the creation request fails with
+       * an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error.
+       * This name must start with `"transferJobs/"` prefix and end with a letter or
+       * a number, and should be no more than 128 characters. This name must not
+       * start with 'transferJobs/OPI'. 'transferJobs/OPI' is a reserved prefix.
+       * Example:
+       * `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"`
+       * Invalid job names will fail with an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * A description provided by the user for the job. Its max length is 1024
+       * bytes when Unicode-encoded.
+       * 
+ * + * 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 description provided by the user for the job. Its max length is 1024
+       * bytes when Unicode-encoded.
+       * 
+ * + * 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 description provided by the user for the job. Its max length is 1024
+       * bytes when Unicode-encoded.
+       * 
+ * + * 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 description provided by the user for the job. Its max length is 1024
+       * bytes when Unicode-encoded.
+       * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * A description provided by the user for the job. Its max length is 1024
+       * bytes when Unicode-encoded.
+       * 
+ * + * 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 java.lang.Object projectId_ = ""; + /** + * + * + *
+       * The ID of the Google Cloud Platform Project that owns the job.
+       * 
+ * + * string project_id = 3; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The ID of the Google Cloud Platform Project that owns the job.
+       * 
+ * + * string project_id = 3; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The ID of the Google Cloud Platform Project that owns the job.
+       * 
+ * + * string project_id = 3; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The ID of the Google Cloud Platform Project that owns the job.
+       * 
+ * + * string project_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+       * The ID of the Google Cloud Platform Project that owns the job.
+       * 
+ * + * string project_id = 3; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + onChanged(); + return this; + } + + private com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec transferSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder> + transferSpecBuilder_; + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + * + * @return Whether the transferSpec field is set. + */ + public boolean hasTransferSpec() { + return transferSpecBuilder_ != null || transferSpec_ != null; + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + * + * @return The transferSpec. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec getTransferSpec() { + if (transferSpecBuilder_ == null) { + return transferSpec_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.getDefaultInstance() + : transferSpec_; + } else { + return transferSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + */ + public Builder setTransferSpec( + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec value) { + if (transferSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transferSpec_ = value; + onChanged(); + } else { + transferSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + */ + public Builder setTransferSpec( + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder builderForValue) { + if (transferSpecBuilder_ == null) { + transferSpec_ = builderForValue.build(); + onChanged(); + } else { + transferSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + */ + public Builder mergeTransferSpec( + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec value) { + if (transferSpecBuilder_ == null) { + if (transferSpec_ != null) { + transferSpec_ = + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.newBuilder( + transferSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + transferSpec_ = value; + } + onChanged(); + } else { + transferSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + */ + public Builder clearTransferSpec() { + if (transferSpecBuilder_ == null) { + transferSpec_ = null; + onChanged(); + } else { + transferSpec_ = null; + transferSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder + getTransferSpecBuilder() { + + onChanged(); + return getTransferSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder + getTransferSpecOrBuilder() { + if (transferSpecBuilder_ != null) { + return transferSpecBuilder_.getMessageOrBuilder(); + } else { + return transferSpec_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.getDefaultInstance() + : transferSpec_; + } + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder> + getTransferSpecFieldBuilder() { + if (transferSpecBuilder_ == null) { + transferSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder>( + getTransferSpec(), getParentForChildren(), isClean()); + transferSpec_ = null; + } + return transferSpecBuilder_; + } + + private com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + notificationConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder> + notificationConfigBuilder_; + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + * + * @return Whether the notificationConfig field is set. + */ + public boolean hasNotificationConfig() { + return notificationConfigBuilder_ != null || notificationConfig_ != null; + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + * + * @return The notificationConfig. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + getNotificationConfig() { + if (notificationConfigBuilder_ == null) { + return notificationConfig_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + .getDefaultInstance() + : notificationConfig_; + } else { + return notificationConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + */ + public Builder setNotificationConfig( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig value) { + if (notificationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notificationConfig_ = value; + onChanged(); + } else { + notificationConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + */ + public Builder setNotificationConfig( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder + builderForValue) { + if (notificationConfigBuilder_ == null) { + notificationConfig_ = builderForValue.build(); + onChanged(); + } else { + notificationConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + */ + public Builder mergeNotificationConfig( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig value) { + if (notificationConfigBuilder_ == null) { + if (notificationConfig_ != null) { + notificationConfig_ = + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.newBuilder( + notificationConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + notificationConfig_ = value; + } + onChanged(); + } else { + notificationConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + */ + public Builder clearNotificationConfig() { + if (notificationConfigBuilder_ == null) { + notificationConfig_ = null; + onChanged(); + } else { + notificationConfig_ = null; + notificationConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder + getNotificationConfigBuilder() { + + onChanged(); + return getNotificationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder + getNotificationConfigOrBuilder() { + if (notificationConfigBuilder_ != null) { + return notificationConfigBuilder_.getMessageOrBuilder(); + } else { + return notificationConfig_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + .getDefaultInstance() + : notificationConfig_; + } + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder> + getNotificationConfigFieldBuilder() { + if (notificationConfigBuilder_ == null) { + notificationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder>( + getNotificationConfig(), getParentForChildren(), isClean()); + notificationConfig_ = null; + } + return notificationConfigBuilder_; + } + + private com.google.storagetransfer.v1.proto.TransferTypes.Schedule schedule_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.Schedule, + com.google.storagetransfer.v1.proto.TransferTypes.Schedule.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.ScheduleOrBuilder> + scheduleBuilder_; + /** + * + * + *
+       * Specifies schedule for the transfer job.
+       * This is an optional field. When the field is not set, the job will never
+       * execute a transfer, unless you invoke RunTransferJob or update the job to
+       * have a non-empty schedule.
+       * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + * + * @return Whether the schedule field is set. + */ + public boolean hasSchedule() { + return scheduleBuilder_ != null || schedule_ != null; + } + /** + * + * + *
+       * Specifies schedule for the transfer job.
+       * This is an optional field. When the field is not set, the job will never
+       * execute a transfer, unless you invoke RunTransferJob or update the job to
+       * have a non-empty schedule.
+       * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + * + * @return The schedule. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.Schedule getSchedule() { + if (scheduleBuilder_ == null) { + return schedule_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.Schedule.getDefaultInstance() + : schedule_; + } else { + return scheduleBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Specifies schedule for the transfer job.
+       * This is an optional field. When the field is not set, the job will never
+       * execute a transfer, unless you invoke RunTransferJob or update the job to
+       * have a non-empty schedule.
+       * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + */ + public Builder setSchedule(com.google.storagetransfer.v1.proto.TransferTypes.Schedule value) { + if (scheduleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + schedule_ = value; + onChanged(); + } else { + scheduleBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Specifies schedule for the transfer job.
+       * This is an optional field. When the field is not set, the job will never
+       * execute a transfer, unless you invoke RunTransferJob or update the job to
+       * have a non-empty schedule.
+       * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + */ + public Builder setSchedule( + com.google.storagetransfer.v1.proto.TransferTypes.Schedule.Builder builderForValue) { + if (scheduleBuilder_ == null) { + schedule_ = builderForValue.build(); + onChanged(); + } else { + scheduleBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Specifies schedule for the transfer job.
+       * This is an optional field. When the field is not set, the job will never
+       * execute a transfer, unless you invoke RunTransferJob or update the job to
+       * have a non-empty schedule.
+       * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + */ + public Builder mergeSchedule( + com.google.storagetransfer.v1.proto.TransferTypes.Schedule value) { + if (scheduleBuilder_ == null) { + if (schedule_ != null) { + schedule_ = + com.google.storagetransfer.v1.proto.TransferTypes.Schedule.newBuilder(schedule_) + .mergeFrom(value) + .buildPartial(); + } else { + schedule_ = value; + } + onChanged(); + } else { + scheduleBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Specifies schedule for the transfer job.
+       * This is an optional field. When the field is not set, the job will never
+       * execute a transfer, unless you invoke RunTransferJob or update the job to
+       * have a non-empty schedule.
+       * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + */ + public Builder clearSchedule() { + if (scheduleBuilder_ == null) { + schedule_ = null; + onChanged(); + } else { + schedule_ = null; + scheduleBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Specifies schedule for the transfer job.
+       * This is an optional field. When the field is not set, the job will never
+       * execute a transfer, unless you invoke RunTransferJob or update the job to
+       * have a non-empty schedule.
+       * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.Schedule.Builder + getScheduleBuilder() { + + onChanged(); + return getScheduleFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Specifies schedule for the transfer job.
+       * This is an optional field. When the field is not set, the job will never
+       * execute a transfer, unless you invoke RunTransferJob or update the job to
+       * have a non-empty schedule.
+       * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ScheduleOrBuilder + getScheduleOrBuilder() { + if (scheduleBuilder_ != null) { + return scheduleBuilder_.getMessageOrBuilder(); + } else { + return schedule_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.Schedule.getDefaultInstance() + : schedule_; + } + } + /** + * + * + *
+       * Specifies schedule for the transfer job.
+       * This is an optional field. When the field is not set, the job will never
+       * execute a transfer, unless you invoke RunTransferJob or update the job to
+       * have a non-empty schedule.
+       * 
+ * + * .google.storagetransfer.v1.Schedule schedule = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.Schedule, + com.google.storagetransfer.v1.proto.TransferTypes.Schedule.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.ScheduleOrBuilder> + getScheduleFieldBuilder() { + if (scheduleBuilder_ == null) { + scheduleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.Schedule, + com.google.storagetransfer.v1.proto.TransferTypes.Schedule.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.ScheduleOrBuilder>( + getSchedule(), getParentForChildren(), isClean()); + schedule_ = null; + } + return scheduleBuilder_; + } + + private int status_ = 0; + /** + * + * + *
+       * Status of the job. This value MUST be specified for
+       * `CreateTransferJobRequests`.
+       * **Note:** The effect of the new job status takes place during a subsequent
+       * job run. For example, if you change the job status from
+       * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to
+       * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an
+       * operation spawned by the transfer is running, the status change would not
+       * affect the current operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferJob.Status status = 6; + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + /** + * + * + *
+       * Status of the job. This value MUST be specified for
+       * `CreateTransferJobRequests`.
+       * **Note:** The effect of the new job status takes place during a subsequent
+       * job run. For example, if you change the job status from
+       * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to
+       * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an
+       * operation spawned by the transfer is running, the status change would not
+       * affect the current operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferJob.Status status = 6; + * + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Status of the job. This value MUST be specified for
+       * `CreateTransferJobRequests`.
+       * **Note:** The effect of the new job status takes place during a subsequent
+       * job run. For example, if you change the job status from
+       * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to
+       * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an
+       * operation spawned by the transfer is running, the status change would not
+       * affect the current operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferJob.Status status = 6; + * + * @return The status. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Status getStatus() { + @SuppressWarnings("deprecation") + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Status result = + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Status.valueOf(status_); + return result == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Status.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Status of the job. This value MUST be specified for
+       * `CreateTransferJobRequests`.
+       * **Note:** The effect of the new job status takes place during a subsequent
+       * job run. For example, if you change the job status from
+       * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to
+       * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an
+       * operation spawned by the transfer is running, the status change would not
+       * affect the current operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferJob.Status status = 6; + * + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus( + com.google.storagetransfer.v1.proto.TransferTypes.TransferJob.Status value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Status of the job. This value MUST be specified for
+       * `CreateTransferJobRequests`.
+       * **Note:** The effect of the new job status takes place during a subsequent
+       * job run. For example, if you change the job status from
+       * [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to
+       * [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an
+       * operation spawned by the transfer is running, the status change would not
+       * affect the current operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferJob.Status status = 6; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp creationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + creationTimeBuilder_; + /** + * + * + *
+       * Output only. The time that the transfer job was created.
+       * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the creationTime field is set. + */ + public boolean hasCreationTime() { + return creationTimeBuilder_ != null || creationTime_ != null; + } + /** + * + * + *
+       * Output only. The time that the transfer job was created.
+       * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The creationTime. + */ + public com.google.protobuf.Timestamp getCreationTime() { + if (creationTimeBuilder_ == null) { + return creationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : creationTime_; + } else { + return creationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Output only. The time that the transfer job was created.
+       * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreationTime(com.google.protobuf.Timestamp value) { + if (creationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + creationTime_ = value; + onChanged(); + } else { + creationTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The time that the transfer job was created.
+       * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreationTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (creationTimeBuilder_ == null) { + creationTime_ = builderForValue.build(); + onChanged(); + } else { + creationTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Output only. The time that the transfer job was created.
+       * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreationTime(com.google.protobuf.Timestamp value) { + if (creationTimeBuilder_ == null) { + if (creationTime_ != null) { + creationTime_ = + com.google.protobuf.Timestamp.newBuilder(creationTime_) + .mergeFrom(value) + .buildPartial(); + } else { + creationTime_ = value; + } + onChanged(); + } else { + creationTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The time that the transfer job was created.
+       * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreationTime() { + if (creationTimeBuilder_ == null) { + creationTime_ = null; + onChanged(); + } else { + creationTime_ = null; + creationTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Output only. The time that the transfer job was created.
+       * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreationTimeBuilder() { + + onChanged(); + return getCreationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. The time that the transfer job was created.
+       * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { + if (creationTimeBuilder_ != null) { + return creationTimeBuilder_.getMessageOrBuilder(); + } else { + return creationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : creationTime_; + } + } + /** + * + * + *
+       * Output only. The time that the transfer job was created.
+       * 
+ * + * + * .google.protobuf.Timestamp creation_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreationTimeFieldBuilder() { + if (creationTimeBuilder_ == null) { + creationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreationTime(), getParentForChildren(), isClean()); + creationTime_ = null; + } + return creationTimeBuilder_; + } + + private com.google.protobuf.Timestamp lastModificationTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastModificationTimeBuilder_; + /** + * + * + *
+       * Output only. The time that the transfer job was last modified.
+       * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastModificationTime field is set. + */ + public boolean hasLastModificationTime() { + return lastModificationTimeBuilder_ != null || lastModificationTime_ != null; + } + /** + * + * + *
+       * Output only. The time that the transfer job was last modified.
+       * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastModificationTime. + */ + public com.google.protobuf.Timestamp getLastModificationTime() { + if (lastModificationTimeBuilder_ == null) { + return lastModificationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastModificationTime_; + } else { + return lastModificationTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Output only. The time that the transfer job was last modified.
+       * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastModificationTime(com.google.protobuf.Timestamp value) { + if (lastModificationTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastModificationTime_ = value; + onChanged(); + } else { + lastModificationTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The time that the transfer job was last modified.
+       * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastModificationTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastModificationTimeBuilder_ == null) { + lastModificationTime_ = builderForValue.build(); + onChanged(); + } else { + lastModificationTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Output only. The time that the transfer job was last modified.
+       * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastModificationTime(com.google.protobuf.Timestamp value) { + if (lastModificationTimeBuilder_ == null) { + if (lastModificationTime_ != null) { + lastModificationTime_ = + com.google.protobuf.Timestamp.newBuilder(lastModificationTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastModificationTime_ = value; + } + onChanged(); + } else { + lastModificationTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The time that the transfer job was last modified.
+       * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastModificationTime() { + if (lastModificationTimeBuilder_ == null) { + lastModificationTime_ = null; + onChanged(); + } else { + lastModificationTime_ = null; + lastModificationTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Output only. The time that the transfer job was last modified.
+       * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastModificationTimeBuilder() { + + onChanged(); + return getLastModificationTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. The time that the transfer job was last modified.
+       * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastModificationTimeOrBuilder() { + if (lastModificationTimeBuilder_ != null) { + return lastModificationTimeBuilder_.getMessageOrBuilder(); + } else { + return lastModificationTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastModificationTime_; + } + } + /** + * + * + *
+       * Output only. The time that the transfer job was last modified.
+       * 
+ * + * + * .google.protobuf.Timestamp last_modification_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastModificationTimeFieldBuilder() { + if (lastModificationTimeBuilder_ == null) { + lastModificationTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastModificationTime(), getParentForChildren(), isClean()); + lastModificationTime_ = null; + } + return lastModificationTimeBuilder_; + } + + private com.google.protobuf.Timestamp deletionTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + deletionTimeBuilder_; + /** + * + * + *
+       * Output only. The time that the transfer job was deleted.
+       * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the deletionTime field is set. + */ + public boolean hasDeletionTime() { + return deletionTimeBuilder_ != null || deletionTime_ != null; + } + /** + * + * + *
+       * Output only. The time that the transfer job was deleted.
+       * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The deletionTime. + */ + public com.google.protobuf.Timestamp getDeletionTime() { + if (deletionTimeBuilder_ == null) { + return deletionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deletionTime_; + } else { + return deletionTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Output only. The time that the transfer job was deleted.
+       * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeletionTime(com.google.protobuf.Timestamp value) { + if (deletionTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + deletionTime_ = value; + onChanged(); + } else { + deletionTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The time that the transfer job was deleted.
+       * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDeletionTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (deletionTimeBuilder_ == null) { + deletionTime_ = builderForValue.build(); + onChanged(); + } else { + deletionTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Output only. The time that the transfer job was deleted.
+       * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeDeletionTime(com.google.protobuf.Timestamp value) { + if (deletionTimeBuilder_ == null) { + if (deletionTime_ != null) { + deletionTime_ = + com.google.protobuf.Timestamp.newBuilder(deletionTime_) + .mergeFrom(value) + .buildPartial(); + } else { + deletionTime_ = value; + } + onChanged(); + } else { + deletionTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Output only. The time that the transfer job was deleted.
+       * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDeletionTime() { + if (deletionTimeBuilder_ == null) { + deletionTime_ = null; + onChanged(); + } else { + deletionTime_ = null; + deletionTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Output only. The time that the transfer job was deleted.
+       * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getDeletionTimeBuilder() { + + onChanged(); + return getDeletionTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. The time that the transfer job was deleted.
+       * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getDeletionTimeOrBuilder() { + if (deletionTimeBuilder_ != null) { + return deletionTimeBuilder_.getMessageOrBuilder(); + } else { + return deletionTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : deletionTime_; + } + } + /** + * + * + *
+       * Output only. The time that the transfer job was deleted.
+       * 
+ * + * + * .google.protobuf.Timestamp deletion_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getDeletionTimeFieldBuilder() { + if (deletionTimeBuilder_ == null) { + deletionTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getDeletionTime(), getParentForChildren(), isClean()); + deletionTime_ = null; + } + return deletionTimeBuilder_; + } + + private java.lang.Object latestOperationName_ = ""; + /** + * + * + *
+       * The name of the most recently started TransferOperation of this JobConfig.
+       * Present if a TransferOperation has been created for this JobConfig.
+       * 
+ * + * string latest_operation_name = 12; + * + * @return The latestOperationName. + */ + public java.lang.String getLatestOperationName() { + java.lang.Object ref = latestOperationName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + latestOperationName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the most recently started TransferOperation of this JobConfig.
+       * Present if a TransferOperation has been created for this JobConfig.
+       * 
+ * + * string latest_operation_name = 12; + * + * @return The bytes for latestOperationName. + */ + public com.google.protobuf.ByteString getLatestOperationNameBytes() { + java.lang.Object ref = latestOperationName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + latestOperationName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the most recently started TransferOperation of this JobConfig.
+       * Present if a TransferOperation has been created for this JobConfig.
+       * 
+ * + * string latest_operation_name = 12; + * + * @param value The latestOperationName to set. + * @return This builder for chaining. + */ + public Builder setLatestOperationName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + latestOperationName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the most recently started TransferOperation of this JobConfig.
+       * Present if a TransferOperation has been created for this JobConfig.
+       * 
+ * + * string latest_operation_name = 12; + * + * @return This builder for chaining. + */ + public Builder clearLatestOperationName() { + + latestOperationName_ = getDefaultInstance().getLatestOperationName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the most recently started TransferOperation of this JobConfig.
+       * Present if a TransferOperation has been created for this JobConfig.
+       * 
+ * + * string latest_operation_name = 12; + * + * @param value The bytes for latestOperationName to set. + * @return This builder for chaining. + */ + public Builder setLatestOperationNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + latestOperationName_ = 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.storagetransfer.v1.TransferJob) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.TransferJob) + private static final com.google.storagetransfer.v1.proto.TransferTypes.TransferJob + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.TransferJob(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferJob + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransferJob parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransferJob(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.storagetransfer.v1.proto.TransferTypes.TransferJob + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ErrorLogEntryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.ErrorLogEntry) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. A URL that refers to the target (a data source, a data sink,
+     * or an object) with which the error is associated.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + java.lang.String getUrl(); + /** + * + * + *
+     * Required. A URL that refers to the target (a data source, a data sink,
+     * or an object) with which the error is associated.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + com.google.protobuf.ByteString getUrlBytes(); + + /** + * + * + *
+     * A list of messages that carry the error details.
+     * 
+ * + * repeated string error_details = 3; + * + * @return A list containing the errorDetails. + */ + java.util.List getErrorDetailsList(); + /** + * + * + *
+     * A list of messages that carry the error details.
+     * 
+ * + * repeated string error_details = 3; + * + * @return The count of errorDetails. + */ + int getErrorDetailsCount(); + /** + * + * + *
+     * A list of messages that carry the error details.
+     * 
+ * + * repeated string error_details = 3; + * + * @param index The index of the element to return. + * @return The errorDetails at the given index. + */ + java.lang.String getErrorDetails(int index); + /** + * + * + *
+     * A list of messages that carry the error details.
+     * 
+ * + * repeated string error_details = 3; + * + * @param index The index of the value to return. + * @return The bytes of the errorDetails at the given index. + */ + com.google.protobuf.ByteString getErrorDetailsBytes(int index); + } + /** + * + * + *
+   * An entry describing an error that has occurred.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.ErrorLogEntry} + */ + public static final class ErrorLogEntry extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.ErrorLogEntry) + ErrorLogEntryOrBuilder { + private static final long serialVersionUID = 0L; + // Use ErrorLogEntry.newBuilder() to construct. + private ErrorLogEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ErrorLogEntry() { + url_ = ""; + errorDetails_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ErrorLogEntry(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ErrorLogEntry( + 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(); + + url_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + errorDetails_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + errorDetails_.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)) { + errorDetails_ = errorDetails_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ErrorLogEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ErrorLogEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.class, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.Builder.class); + } + + public static final int URL_FIELD_NUMBER = 1; + private volatile java.lang.Object url_; + /** + * + * + *
+     * Required. A URL that refers to the target (a data source, a data sink,
+     * or an object) with which the error is associated.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } + } + /** + * + * + *
+     * Required. A URL that refers to the target (a data source, a data sink,
+     * or an object) with which the error is associated.
+     * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ERROR_DETAILS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList errorDetails_; + /** + * + * + *
+     * A list of messages that carry the error details.
+     * 
+ * + * repeated string error_details = 3; + * + * @return A list containing the errorDetails. + */ + public com.google.protobuf.ProtocolStringList getErrorDetailsList() { + return errorDetails_; + } + /** + * + * + *
+     * A list of messages that carry the error details.
+     * 
+ * + * repeated string error_details = 3; + * + * @return The count of errorDetails. + */ + public int getErrorDetailsCount() { + return errorDetails_.size(); + } + /** + * + * + *
+     * A list of messages that carry the error details.
+     * 
+ * + * repeated string error_details = 3; + * + * @param index The index of the element to return. + * @return The errorDetails at the given index. + */ + public java.lang.String getErrorDetails(int index) { + return errorDetails_.get(index); + } + /** + * + * + *
+     * A list of messages that carry the error details.
+     * 
+ * + * repeated string error_details = 3; + * + * @param index The index of the value to return. + * @return The bytes of the errorDetails at the given index. + */ + public com.google.protobuf.ByteString getErrorDetailsBytes(int index) { + return errorDetails_.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 (!getUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); + } + for (int i = 0; i < errorDetails_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, errorDetails_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); + } + { + int dataSize = 0; + for (int i = 0; i < errorDetails_.size(); i++) { + dataSize += computeStringSizeNoTag(errorDetails_.getRaw(i)); + } + size += dataSize; + size += 1 * getErrorDetailsList().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.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry other = + (com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry) obj; + + if (!getUrl().equals(other.getUrl())) return false; + if (!getErrorDetailsList().equals(other.getErrorDetailsList())) 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) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + if (getErrorDetailsCount() > 0) { + hash = (37 * hash) + ERROR_DETAILS_FIELD_NUMBER; + hash = (53 * hash) + getErrorDetailsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry 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.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry 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.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry + 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.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry 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.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry 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 entry describing an error that has occurred.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.ErrorLogEntry} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.ErrorLogEntry) + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ErrorLogEntry_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ErrorLogEntry_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.class, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.Builder.class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.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(); + url_ = ""; + + errorDetails_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ErrorLogEntry_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry build() { + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry result = + new com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry(this); + int from_bitField0_ = bitField0_; + result.url_ = url_; + if (((bitField0_ & 0x00000001) != 0)) { + errorDetails_ = errorDetails_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errorDetails_ = errorDetails_; + 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.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry) { + return mergeFrom((com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.getDefaultInstance()) + return this; + if (!other.getUrl().isEmpty()) { + url_ = other.url_; + onChanged(); + } + if (!other.errorDetails_.isEmpty()) { + if (errorDetails_.isEmpty()) { + errorDetails_ = other.errorDetails_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorDetailsIsMutable(); + errorDetails_.addAll(other.errorDetails_); + } + 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.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object url_ = ""; + /** + * + * + *
+       * Required. A URL that refers to the target (a data source, a data sink,
+       * or an object) with which the error is associated.
+       * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = url_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + url_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. A URL that refers to the target (a data source, a data sink,
+       * or an object) with which the error is associated.
+       * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for url. + */ + public com.google.protobuf.ByteString getUrlBytes() { + java.lang.Object ref = url_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + url_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. A URL that refers to the target (a data source, a data sink,
+       * or an object) with which the error is associated.
+       * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The url to set. + * @return This builder for chaining. + */ + public Builder setUrl(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + url_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. A URL that refers to the target (a data source, a data sink,
+       * or an object) with which the error is associated.
+       * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUrl() { + + url_ = getDefaultInstance().getUrl(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. A URL that refers to the target (a data source, a data sink,
+       * or an object) with which the error is associated.
+       * 
+ * + * string url = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for url to set. + * @return This builder for chaining. + */ + public Builder setUrlBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + url_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList errorDetails_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureErrorDetailsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errorDetails_ = new com.google.protobuf.LazyStringArrayList(errorDetails_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * A list of messages that carry the error details.
+       * 
+ * + * repeated string error_details = 3; + * + * @return A list containing the errorDetails. + */ + public com.google.protobuf.ProtocolStringList getErrorDetailsList() { + return errorDetails_.getUnmodifiableView(); + } + /** + * + * + *
+       * A list of messages that carry the error details.
+       * 
+ * + * repeated string error_details = 3; + * + * @return The count of errorDetails. + */ + public int getErrorDetailsCount() { + return errorDetails_.size(); + } + /** + * + * + *
+       * A list of messages that carry the error details.
+       * 
+ * + * repeated string error_details = 3; + * + * @param index The index of the element to return. + * @return The errorDetails at the given index. + */ + public java.lang.String getErrorDetails(int index) { + return errorDetails_.get(index); + } + /** + * + * + *
+       * A list of messages that carry the error details.
+       * 
+ * + * repeated string error_details = 3; + * + * @param index The index of the value to return. + * @return The bytes of the errorDetails at the given index. + */ + public com.google.protobuf.ByteString getErrorDetailsBytes(int index) { + return errorDetails_.getByteString(index); + } + /** + * + * + *
+       * A list of messages that carry the error details.
+       * 
+ * + * repeated string error_details = 3; + * + * @param index The index to set the value at. + * @param value The errorDetails to set. + * @return This builder for chaining. + */ + public Builder setErrorDetails(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorDetailsIsMutable(); + errorDetails_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of messages that carry the error details.
+       * 
+ * + * repeated string error_details = 3; + * + * @param value The errorDetails to add. + * @return This builder for chaining. + */ + public Builder addErrorDetails(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorDetailsIsMutable(); + errorDetails_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of messages that carry the error details.
+       * 
+ * + * repeated string error_details = 3; + * + * @param values The errorDetails to add. + * @return This builder for chaining. + */ + public Builder addAllErrorDetails(java.lang.Iterable values) { + ensureErrorDetailsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errorDetails_); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of messages that carry the error details.
+       * 
+ * + * repeated string error_details = 3; + * + * @return This builder for chaining. + */ + public Builder clearErrorDetails() { + errorDetails_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * A list of messages that carry the error details.
+       * 
+ * + * repeated string error_details = 3; + * + * @param value The bytes of the errorDetails to add. + * @return This builder for chaining. + */ + public Builder addErrorDetailsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureErrorDetailsIsMutable(); + errorDetails_.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.storagetransfer.v1.ErrorLogEntry) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.ErrorLogEntry) + private static final com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ErrorLogEntry parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ErrorLogEntry(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.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ErrorSummaryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.ErrorSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required.
+     * 
+ * + * .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The enum numeric value on the wire for errorCode. + */ + int getErrorCodeValue(); + /** + * + * + *
+     * Required.
+     * 
+ * + * .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The errorCode. + */ + com.google.rpc.Code getErrorCode(); + + /** + * + * + *
+     * Required. Count of this type of error.
+     * 
+ * + * int64 error_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The errorCount. + */ + long getErrorCount(); + + /** + * + * + *
+     * Error samples.
+     * At most 5 error log entries will be recorded for a given
+     * error code for a single transfer operation.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + java.util.List + getErrorLogEntriesList(); + /** + * + * + *
+     * Error samples.
+     * At most 5 error log entries will be recorded for a given
+     * error code for a single transfer operation.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry getErrorLogEntries(int index); + /** + * + * + *
+     * Error samples.
+     * At most 5 error log entries will be recorded for a given
+     * error code for a single transfer operation.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + int getErrorLogEntriesCount(); + /** + * + * + *
+     * Error samples.
+     * At most 5 error log entries will be recorded for a given
+     * error code for a single transfer operation.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + java.util.List< + ? extends com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntryOrBuilder> + getErrorLogEntriesOrBuilderList(); + /** + * + * + *
+     * Error samples.
+     * At most 5 error log entries will be recorded for a given
+     * error code for a single transfer operation.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntryOrBuilder + getErrorLogEntriesOrBuilder(int index); + } + /** + * + * + *
+   * A summary of errors by error code, plus a count and sample error log
+   * entries.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.ErrorSummary} + */ + public static final class ErrorSummary extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.ErrorSummary) + ErrorSummaryOrBuilder { + private static final long serialVersionUID = 0L; + // Use ErrorSummary.newBuilder() to construct. + private ErrorSummary(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ErrorSummary() { + errorCode_ = 0; + errorLogEntries_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ErrorSummary(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ErrorSummary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + errorCode_ = rawValue; + break; + } + case 16: + { + errorCount_ = input.readInt64(); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + errorLogEntries_ = + new java.util.ArrayList< + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry>(); + mutable_bitField0_ |= 0x00000001; + } + errorLogEntries_.add( + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + errorLogEntries_ = java.util.Collections.unmodifiableList(errorLogEntries_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ErrorSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ErrorSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.class, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.Builder.class); + } + + public static final int ERROR_CODE_FIELD_NUMBER = 1; + private int errorCode_; + /** + * + * + *
+     * Required.
+     * 
+ * + * .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The enum numeric value on the wire for errorCode. + */ + @java.lang.Override + public int getErrorCodeValue() { + return errorCode_; + } + /** + * + * + *
+     * Required.
+     * 
+ * + * .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The errorCode. + */ + @java.lang.Override + public com.google.rpc.Code getErrorCode() { + @SuppressWarnings("deprecation") + com.google.rpc.Code result = com.google.rpc.Code.valueOf(errorCode_); + return result == null ? com.google.rpc.Code.UNRECOGNIZED : result; + } + + public static final int ERROR_COUNT_FIELD_NUMBER = 2; + private long errorCount_; + /** + * + * + *
+     * Required. Count of this type of error.
+     * 
+ * + * int64 error_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The errorCount. + */ + @java.lang.Override + public long getErrorCount() { + return errorCount_; + } + + public static final int ERROR_LOG_ENTRIES_FIELD_NUMBER = 3; + private java.util.List + errorLogEntries_; + /** + * + * + *
+     * Error samples.
+     * At most 5 error log entries will be recorded for a given
+     * error code for a single transfer operation.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + @java.lang.Override + public java.util.List + getErrorLogEntriesList() { + return errorLogEntries_; + } + /** + * + * + *
+     * Error samples.
+     * At most 5 error log entries will be recorded for a given
+     * error code for a single transfer operation.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntryOrBuilder> + getErrorLogEntriesOrBuilderList() { + return errorLogEntries_; + } + /** + * + * + *
+     * Error samples.
+     * At most 5 error log entries will be recorded for a given
+     * error code for a single transfer operation.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + @java.lang.Override + public int getErrorLogEntriesCount() { + return errorLogEntries_.size(); + } + /** + * + * + *
+     * Error samples.
+     * At most 5 error log entries will be recorded for a given
+     * error code for a single transfer operation.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry getErrorLogEntries( + int index) { + return errorLogEntries_.get(index); + } + /** + * + * + *
+     * Error samples.
+     * At most 5 error log entries will be recorded for a given
+     * error code for a single transfer operation.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntryOrBuilder + getErrorLogEntriesOrBuilder(int index) { + return errorLogEntries_.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 (errorCode_ != com.google.rpc.Code.OK.getNumber()) { + output.writeEnum(1, errorCode_); + } + if (errorCount_ != 0L) { + output.writeInt64(2, errorCount_); + } + for (int i = 0; i < errorLogEntries_.size(); i++) { + output.writeMessage(3, errorLogEntries_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (errorCode_ != com.google.rpc.Code.OK.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, errorCode_); + } + if (errorCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, errorCount_); + } + for (int i = 0; i < errorLogEntries_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, errorLogEntries_.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.storagetransfer.v1.proto.TransferTypes.ErrorSummary)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary other = + (com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary) obj; + + if (errorCode_ != other.errorCode_) return false; + if (getErrorCount() != other.getErrorCount()) return false; + if (!getErrorLogEntriesList().equals(other.getErrorLogEntriesList())) 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) + ERROR_CODE_FIELD_NUMBER; + hash = (53 * hash) + errorCode_; + hash = (37 * hash) + ERROR_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getErrorCount()); + if (getErrorLogEntriesCount() > 0) { + hash = (37 * hash) + ERROR_LOG_ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getErrorLogEntriesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary 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.storagetransfer.v1.proto.TransferTypes.ErrorSummary parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary 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.storagetransfer.v1.proto.TransferTypes.ErrorSummary parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary 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.storagetransfer.v1.proto.TransferTypes.ErrorSummary parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary 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.storagetransfer.v1.proto.TransferTypes.ErrorSummary prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A summary of errors by error code, plus a count and sample error log
+     * entries.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.ErrorSummary} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.ErrorSummary) + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ErrorSummary_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ErrorSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.class, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.Builder.class); + } + + // Construct using com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getErrorLogEntriesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + errorCode_ = 0; + + errorCount_ = 0L; + + if (errorLogEntriesBuilder_ == null) { + errorLogEntries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + errorLogEntriesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_ErrorSummary_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary build() { + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary result = + new com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary(this); + int from_bitField0_ = bitField0_; + result.errorCode_ = errorCode_; + result.errorCount_ = errorCount_; + if (errorLogEntriesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errorLogEntries_ = java.util.Collections.unmodifiableList(errorLogEntries_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errorLogEntries_ = errorLogEntries_; + } else { + result.errorLogEntries_ = errorLogEntriesBuilder_.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.storagetransfer.v1.proto.TransferTypes.ErrorSummary) { + return mergeFrom((com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.getDefaultInstance()) + return this; + if (other.errorCode_ != 0) { + setErrorCodeValue(other.getErrorCodeValue()); + } + if (other.getErrorCount() != 0L) { + setErrorCount(other.getErrorCount()); + } + if (errorLogEntriesBuilder_ == null) { + if (!other.errorLogEntries_.isEmpty()) { + if (errorLogEntries_.isEmpty()) { + errorLogEntries_ = other.errorLogEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorLogEntriesIsMutable(); + errorLogEntries_.addAll(other.errorLogEntries_); + } + onChanged(); + } + } else { + if (!other.errorLogEntries_.isEmpty()) { + if (errorLogEntriesBuilder_.isEmpty()) { + errorLogEntriesBuilder_.dispose(); + errorLogEntriesBuilder_ = null; + errorLogEntries_ = other.errorLogEntries_; + bitField0_ = (bitField0_ & ~0x00000001); + errorLogEntriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorLogEntriesFieldBuilder() + : null; + } else { + errorLogEntriesBuilder_.addAllMessages(other.errorLogEntries_); + } + } + } + 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.storagetransfer.v1.proto.TransferTypes.ErrorSummary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int errorCode_ = 0; + /** + * + * + *
+       * Required.
+       * 
+ * + * .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The enum numeric value on the wire for errorCode. + */ + @java.lang.Override + public int getErrorCodeValue() { + return errorCode_; + } + /** + * + * + *
+       * Required.
+       * 
+ * + * .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The enum numeric value on the wire for errorCode to set. + * @return This builder for chaining. + */ + public Builder setErrorCodeValue(int value) { + + errorCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required.
+       * 
+ * + * .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The errorCode. + */ + @java.lang.Override + public com.google.rpc.Code getErrorCode() { + @SuppressWarnings("deprecation") + com.google.rpc.Code result = com.google.rpc.Code.valueOf(errorCode_); + return result == null ? com.google.rpc.Code.UNRECOGNIZED : result; + } + /** + * + * + *
+       * Required.
+       * 
+ * + * .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The errorCode to set. + * @return This builder for chaining. + */ + public Builder setErrorCode(com.google.rpc.Code value) { + if (value == null) { + throw new NullPointerException(); + } + + errorCode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required.
+       * 
+ * + * .google.rpc.Code error_code = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearErrorCode() { + + errorCode_ = 0; + onChanged(); + return this; + } + + private long errorCount_; + /** + * + * + *
+       * Required. Count of this type of error.
+       * 
+ * + * int64 error_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The errorCount. + */ + @java.lang.Override + public long getErrorCount() { + return errorCount_; + } + /** + * + * + *
+       * Required. Count of this type of error.
+       * 
+ * + * int64 error_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The errorCount to set. + * @return This builder for chaining. + */ + public Builder setErrorCount(long value) { + + errorCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Count of this type of error.
+       * 
+ * + * int64 error_count = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearErrorCount() { + + errorCount_ = 0L; + onChanged(); + return this; + } + + private java.util.List + errorLogEntries_ = java.util.Collections.emptyList(); + + private void ensureErrorLogEntriesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errorLogEntries_ = + new java.util.ArrayList< + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry>( + errorLogEntries_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntryOrBuilder> + errorLogEntriesBuilder_; + + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public java.util.List + getErrorLogEntriesList() { + if (errorLogEntriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(errorLogEntries_); + } else { + return errorLogEntriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public int getErrorLogEntriesCount() { + if (errorLogEntriesBuilder_ == null) { + return errorLogEntries_.size(); + } else { + return errorLogEntriesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry getErrorLogEntries( + int index) { + if (errorLogEntriesBuilder_ == null) { + return errorLogEntries_.get(index); + } else { + return errorLogEntriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public Builder setErrorLogEntries( + int index, com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry value) { + if (errorLogEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorLogEntriesIsMutable(); + errorLogEntries_.set(index, value); + onChanged(); + } else { + errorLogEntriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public Builder setErrorLogEntries( + int index, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.Builder builderForValue) { + if (errorLogEntriesBuilder_ == null) { + ensureErrorLogEntriesIsMutable(); + errorLogEntries_.set(index, builderForValue.build()); + onChanged(); + } else { + errorLogEntriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public Builder addErrorLogEntries( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry value) { + if (errorLogEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorLogEntriesIsMutable(); + errorLogEntries_.add(value); + onChanged(); + } else { + errorLogEntriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public Builder addErrorLogEntries( + int index, com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry value) { + if (errorLogEntriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorLogEntriesIsMutable(); + errorLogEntries_.add(index, value); + onChanged(); + } else { + errorLogEntriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public Builder addErrorLogEntries( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.Builder builderForValue) { + if (errorLogEntriesBuilder_ == null) { + ensureErrorLogEntriesIsMutable(); + errorLogEntries_.add(builderForValue.build()); + onChanged(); + } else { + errorLogEntriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public Builder addErrorLogEntries( + int index, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.Builder builderForValue) { + if (errorLogEntriesBuilder_ == null) { + ensureErrorLogEntriesIsMutable(); + errorLogEntries_.add(index, builderForValue.build()); + onChanged(); + } else { + errorLogEntriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public Builder addAllErrorLogEntries( + java.lang.Iterable< + ? extends com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry> + values) { + if (errorLogEntriesBuilder_ == null) { + ensureErrorLogEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errorLogEntries_); + onChanged(); + } else { + errorLogEntriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public Builder clearErrorLogEntries() { + if (errorLogEntriesBuilder_ == null) { + errorLogEntries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorLogEntriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public Builder removeErrorLogEntries(int index) { + if (errorLogEntriesBuilder_ == null) { + ensureErrorLogEntriesIsMutable(); + errorLogEntries_.remove(index); + onChanged(); + } else { + errorLogEntriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.Builder + getErrorLogEntriesBuilder(int index) { + return getErrorLogEntriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntryOrBuilder + getErrorLogEntriesOrBuilder(int index) { + if (errorLogEntriesBuilder_ == null) { + return errorLogEntries_.get(index); + } else { + return errorLogEntriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public java.util.List< + ? extends com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntryOrBuilder> + getErrorLogEntriesOrBuilderList() { + if (errorLogEntriesBuilder_ != null) { + return errorLogEntriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errorLogEntries_); + } + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.Builder + addErrorLogEntriesBuilder() { + return getErrorLogEntriesFieldBuilder() + .addBuilder( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry + .getDefaultInstance()); + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.Builder + addErrorLogEntriesBuilder(int index) { + return getErrorLogEntriesFieldBuilder() + .addBuilder( + index, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry + .getDefaultInstance()); + } + /** + * + * + *
+       * Error samples.
+       * At most 5 error log entries will be recorded for a given
+       * error code for a single transfer operation.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorLogEntry error_log_entries = 3; + */ + public java.util.List + getErrorLogEntriesBuilderList() { + return getErrorLogEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntryOrBuilder> + getErrorLogEntriesFieldBuilder() { + if (errorLogEntriesBuilder_ == null) { + errorLogEntriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntry.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorLogEntryOrBuilder>( + errorLogEntries_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + errorLogEntries_ = null; + } + return errorLogEntriesBuilder_; + } + + @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.storagetransfer.v1.ErrorSummary) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.ErrorSummary) + private static final com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ErrorSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ErrorSummary(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.storagetransfer.v1.proto.TransferTypes.ErrorSummary + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TransferCountersOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.TransferCounters) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Objects found in the data source that are scheduled to be transferred,
+     * excluding any that are filtered based on object conditions or skipped due
+     * to sync.
+     * 
+ * + * int64 objects_found_from_source = 1; + * + * @return The objectsFoundFromSource. + */ + long getObjectsFoundFromSource(); + + /** + * + * + *
+     * Bytes found in the data source that are scheduled to be transferred,
+     * excluding any that are filtered based on object conditions or skipped due
+     * to sync.
+     * 
+ * + * int64 bytes_found_from_source = 2; + * + * @return The bytesFoundFromSource. + */ + long getBytesFoundFromSource(); + + /** + * + * + *
+     * Objects found only in the data sink that are scheduled to be deleted.
+     * 
+ * + * int64 objects_found_only_from_sink = 3; + * + * @return The objectsFoundOnlyFromSink. + */ + long getObjectsFoundOnlyFromSink(); + + /** + * + * + *
+     * Bytes found only in the data sink that are scheduled to be deleted.
+     * 
+ * + * int64 bytes_found_only_from_sink = 4; + * + * @return The bytesFoundOnlyFromSink. + */ + long getBytesFoundOnlyFromSink(); + + /** + * + * + *
+     * Objects in the data source that are not transferred because they already
+     * exist in the data sink.
+     * 
+ * + * int64 objects_from_source_skipped_by_sync = 5; + * + * @return The objectsFromSourceSkippedBySync. + */ + long getObjectsFromSourceSkippedBySync(); + + /** + * + * + *
+     * Bytes in the data source that are not transferred because they already
+     * exist in the data sink.
+     * 
+ * + * int64 bytes_from_source_skipped_by_sync = 6; + * + * @return The bytesFromSourceSkippedBySync. + */ + long getBytesFromSourceSkippedBySync(); + + /** + * + * + *
+     * Objects that are copied to the data sink.
+     * 
+ * + * int64 objects_copied_to_sink = 7; + * + * @return The objectsCopiedToSink. + */ + long getObjectsCopiedToSink(); + + /** + * + * + *
+     * Bytes that are copied to the data sink.
+     * 
+ * + * int64 bytes_copied_to_sink = 8; + * + * @return The bytesCopiedToSink. + */ + long getBytesCopiedToSink(); + + /** + * + * + *
+     * Objects that are deleted from the data source.
+     * 
+ * + * int64 objects_deleted_from_source = 9; + * + * @return The objectsDeletedFromSource. + */ + long getObjectsDeletedFromSource(); + + /** + * + * + *
+     * Bytes that are deleted from the data source.
+     * 
+ * + * int64 bytes_deleted_from_source = 10; + * + * @return The bytesDeletedFromSource. + */ + long getBytesDeletedFromSource(); + + /** + * + * + *
+     * Objects that are deleted from the data sink.
+     * 
+ * + * int64 objects_deleted_from_sink = 11; + * + * @return The objectsDeletedFromSink. + */ + long getObjectsDeletedFromSink(); + + /** + * + * + *
+     * Bytes that are deleted from the data sink.
+     * 
+ * + * int64 bytes_deleted_from_sink = 12; + * + * @return The bytesDeletedFromSink. + */ + long getBytesDeletedFromSink(); + + /** + * + * + *
+     * Objects in the data source that failed to be transferred or that failed
+     * to be deleted after being transferred.
+     * 
+ * + * int64 objects_from_source_failed = 13; + * + * @return The objectsFromSourceFailed. + */ + long getObjectsFromSourceFailed(); + + /** + * + * + *
+     * Bytes in the data source that failed to be transferred or that failed to
+     * be deleted after being transferred.
+     * 
+ * + * int64 bytes_from_source_failed = 14; + * + * @return The bytesFromSourceFailed. + */ + long getBytesFromSourceFailed(); + + /** + * + * + *
+     * Objects that failed to be deleted from the data sink.
+     * 
+ * + * int64 objects_failed_to_delete_from_sink = 15; + * + * @return The objectsFailedToDeleteFromSink. + */ + long getObjectsFailedToDeleteFromSink(); + + /** + * + * + *
+     * Bytes that failed to be deleted from the data sink.
+     * 
+ * + * int64 bytes_failed_to_delete_from_sink = 16; + * + * @return The bytesFailedToDeleteFromSink. + */ + long getBytesFailedToDeleteFromSink(); + } + /** + * + * + *
+   * A collection of counters that report the progress of a transfer operation.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.TransferCounters} + */ + public static final class TransferCounters extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.TransferCounters) + TransferCountersOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransferCounters.newBuilder() to construct. + private TransferCounters(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransferCounters() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransferCounters(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransferCounters( + 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: + { + objectsFoundFromSource_ = input.readInt64(); + break; + } + case 16: + { + bytesFoundFromSource_ = input.readInt64(); + break; + } + case 24: + { + objectsFoundOnlyFromSink_ = input.readInt64(); + break; + } + case 32: + { + bytesFoundOnlyFromSink_ = input.readInt64(); + break; + } + case 40: + { + objectsFromSourceSkippedBySync_ = input.readInt64(); + break; + } + case 48: + { + bytesFromSourceSkippedBySync_ = input.readInt64(); + break; + } + case 56: + { + objectsCopiedToSink_ = input.readInt64(); + break; + } + case 64: + { + bytesCopiedToSink_ = input.readInt64(); + break; + } + case 72: + { + objectsDeletedFromSource_ = input.readInt64(); + break; + } + case 80: + { + bytesDeletedFromSource_ = input.readInt64(); + break; + } + case 88: + { + objectsDeletedFromSink_ = input.readInt64(); + break; + } + case 96: + { + bytesDeletedFromSink_ = input.readInt64(); + break; + } + case 104: + { + objectsFromSourceFailed_ = input.readInt64(); + break; + } + case 112: + { + bytesFromSourceFailed_ = input.readInt64(); + break; + } + case 120: + { + objectsFailedToDeleteFromSink_ = input.readInt64(); + break; + } + case 128: + { + bytesFailedToDeleteFromSink_ = 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.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferCounters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferCounters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.class, + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.Builder.class); + } + + public static final int OBJECTS_FOUND_FROM_SOURCE_FIELD_NUMBER = 1; + private long objectsFoundFromSource_; + /** + * + * + *
+     * Objects found in the data source that are scheduled to be transferred,
+     * excluding any that are filtered based on object conditions or skipped due
+     * to sync.
+     * 
+ * + * int64 objects_found_from_source = 1; + * + * @return The objectsFoundFromSource. + */ + @java.lang.Override + public long getObjectsFoundFromSource() { + return objectsFoundFromSource_; + } + + public static final int BYTES_FOUND_FROM_SOURCE_FIELD_NUMBER = 2; + private long bytesFoundFromSource_; + /** + * + * + *
+     * Bytes found in the data source that are scheduled to be transferred,
+     * excluding any that are filtered based on object conditions or skipped due
+     * to sync.
+     * 
+ * + * int64 bytes_found_from_source = 2; + * + * @return The bytesFoundFromSource. + */ + @java.lang.Override + public long getBytesFoundFromSource() { + return bytesFoundFromSource_; + } + + public static final int OBJECTS_FOUND_ONLY_FROM_SINK_FIELD_NUMBER = 3; + private long objectsFoundOnlyFromSink_; + /** + * + * + *
+     * Objects found only in the data sink that are scheduled to be deleted.
+     * 
+ * + * int64 objects_found_only_from_sink = 3; + * + * @return The objectsFoundOnlyFromSink. + */ + @java.lang.Override + public long getObjectsFoundOnlyFromSink() { + return objectsFoundOnlyFromSink_; + } + + public static final int BYTES_FOUND_ONLY_FROM_SINK_FIELD_NUMBER = 4; + private long bytesFoundOnlyFromSink_; + /** + * + * + *
+     * Bytes found only in the data sink that are scheduled to be deleted.
+     * 
+ * + * int64 bytes_found_only_from_sink = 4; + * + * @return The bytesFoundOnlyFromSink. + */ + @java.lang.Override + public long getBytesFoundOnlyFromSink() { + return bytesFoundOnlyFromSink_; + } + + public static final int OBJECTS_FROM_SOURCE_SKIPPED_BY_SYNC_FIELD_NUMBER = 5; + private long objectsFromSourceSkippedBySync_; + /** + * + * + *
+     * Objects in the data source that are not transferred because they already
+     * exist in the data sink.
+     * 
+ * + * int64 objects_from_source_skipped_by_sync = 5; + * + * @return The objectsFromSourceSkippedBySync. + */ + @java.lang.Override + public long getObjectsFromSourceSkippedBySync() { + return objectsFromSourceSkippedBySync_; + } + + public static final int BYTES_FROM_SOURCE_SKIPPED_BY_SYNC_FIELD_NUMBER = 6; + private long bytesFromSourceSkippedBySync_; + /** + * + * + *
+     * Bytes in the data source that are not transferred because they already
+     * exist in the data sink.
+     * 
+ * + * int64 bytes_from_source_skipped_by_sync = 6; + * + * @return The bytesFromSourceSkippedBySync. + */ + @java.lang.Override + public long getBytesFromSourceSkippedBySync() { + return bytesFromSourceSkippedBySync_; + } + + public static final int OBJECTS_COPIED_TO_SINK_FIELD_NUMBER = 7; + private long objectsCopiedToSink_; + /** + * + * + *
+     * Objects that are copied to the data sink.
+     * 
+ * + * int64 objects_copied_to_sink = 7; + * + * @return The objectsCopiedToSink. + */ + @java.lang.Override + public long getObjectsCopiedToSink() { + return objectsCopiedToSink_; + } + + public static final int BYTES_COPIED_TO_SINK_FIELD_NUMBER = 8; + private long bytesCopiedToSink_; + /** + * + * + *
+     * Bytes that are copied to the data sink.
+     * 
+ * + * int64 bytes_copied_to_sink = 8; + * + * @return The bytesCopiedToSink. + */ + @java.lang.Override + public long getBytesCopiedToSink() { + return bytesCopiedToSink_; + } + + public static final int OBJECTS_DELETED_FROM_SOURCE_FIELD_NUMBER = 9; + private long objectsDeletedFromSource_; + /** + * + * + *
+     * Objects that are deleted from the data source.
+     * 
+ * + * int64 objects_deleted_from_source = 9; + * + * @return The objectsDeletedFromSource. + */ + @java.lang.Override + public long getObjectsDeletedFromSource() { + return objectsDeletedFromSource_; + } + + public static final int BYTES_DELETED_FROM_SOURCE_FIELD_NUMBER = 10; + private long bytesDeletedFromSource_; + /** + * + * + *
+     * Bytes that are deleted from the data source.
+     * 
+ * + * int64 bytes_deleted_from_source = 10; + * + * @return The bytesDeletedFromSource. + */ + @java.lang.Override + public long getBytesDeletedFromSource() { + return bytesDeletedFromSource_; + } + + public static final int OBJECTS_DELETED_FROM_SINK_FIELD_NUMBER = 11; + private long objectsDeletedFromSink_; + /** + * + * + *
+     * Objects that are deleted from the data sink.
+     * 
+ * + * int64 objects_deleted_from_sink = 11; + * + * @return The objectsDeletedFromSink. + */ + @java.lang.Override + public long getObjectsDeletedFromSink() { + return objectsDeletedFromSink_; + } + + public static final int BYTES_DELETED_FROM_SINK_FIELD_NUMBER = 12; + private long bytesDeletedFromSink_; + /** + * + * + *
+     * Bytes that are deleted from the data sink.
+     * 
+ * + * int64 bytes_deleted_from_sink = 12; + * + * @return The bytesDeletedFromSink. + */ + @java.lang.Override + public long getBytesDeletedFromSink() { + return bytesDeletedFromSink_; + } + + public static final int OBJECTS_FROM_SOURCE_FAILED_FIELD_NUMBER = 13; + private long objectsFromSourceFailed_; + /** + * + * + *
+     * Objects in the data source that failed to be transferred or that failed
+     * to be deleted after being transferred.
+     * 
+ * + * int64 objects_from_source_failed = 13; + * + * @return The objectsFromSourceFailed. + */ + @java.lang.Override + public long getObjectsFromSourceFailed() { + return objectsFromSourceFailed_; + } + + public static final int BYTES_FROM_SOURCE_FAILED_FIELD_NUMBER = 14; + private long bytesFromSourceFailed_; + /** + * + * + *
+     * Bytes in the data source that failed to be transferred or that failed to
+     * be deleted after being transferred.
+     * 
+ * + * int64 bytes_from_source_failed = 14; + * + * @return The bytesFromSourceFailed. + */ + @java.lang.Override + public long getBytesFromSourceFailed() { + return bytesFromSourceFailed_; + } + + public static final int OBJECTS_FAILED_TO_DELETE_FROM_SINK_FIELD_NUMBER = 15; + private long objectsFailedToDeleteFromSink_; + /** + * + * + *
+     * Objects that failed to be deleted from the data sink.
+     * 
+ * + * int64 objects_failed_to_delete_from_sink = 15; + * + * @return The objectsFailedToDeleteFromSink. + */ + @java.lang.Override + public long getObjectsFailedToDeleteFromSink() { + return objectsFailedToDeleteFromSink_; + } + + public static final int BYTES_FAILED_TO_DELETE_FROM_SINK_FIELD_NUMBER = 16; + private long bytesFailedToDeleteFromSink_; + /** + * + * + *
+     * Bytes that failed to be deleted from the data sink.
+     * 
+ * + * int64 bytes_failed_to_delete_from_sink = 16; + * + * @return The bytesFailedToDeleteFromSink. + */ + @java.lang.Override + public long getBytesFailedToDeleteFromSink() { + return bytesFailedToDeleteFromSink_; + } + + 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 (objectsFoundFromSource_ != 0L) { + output.writeInt64(1, objectsFoundFromSource_); + } + if (bytesFoundFromSource_ != 0L) { + output.writeInt64(2, bytesFoundFromSource_); + } + if (objectsFoundOnlyFromSink_ != 0L) { + output.writeInt64(3, objectsFoundOnlyFromSink_); + } + if (bytesFoundOnlyFromSink_ != 0L) { + output.writeInt64(4, bytesFoundOnlyFromSink_); + } + if (objectsFromSourceSkippedBySync_ != 0L) { + output.writeInt64(5, objectsFromSourceSkippedBySync_); + } + if (bytesFromSourceSkippedBySync_ != 0L) { + output.writeInt64(6, bytesFromSourceSkippedBySync_); + } + if (objectsCopiedToSink_ != 0L) { + output.writeInt64(7, objectsCopiedToSink_); + } + if (bytesCopiedToSink_ != 0L) { + output.writeInt64(8, bytesCopiedToSink_); + } + if (objectsDeletedFromSource_ != 0L) { + output.writeInt64(9, objectsDeletedFromSource_); + } + if (bytesDeletedFromSource_ != 0L) { + output.writeInt64(10, bytesDeletedFromSource_); + } + if (objectsDeletedFromSink_ != 0L) { + output.writeInt64(11, objectsDeletedFromSink_); + } + if (bytesDeletedFromSink_ != 0L) { + output.writeInt64(12, bytesDeletedFromSink_); + } + if (objectsFromSourceFailed_ != 0L) { + output.writeInt64(13, objectsFromSourceFailed_); + } + if (bytesFromSourceFailed_ != 0L) { + output.writeInt64(14, bytesFromSourceFailed_); + } + if (objectsFailedToDeleteFromSink_ != 0L) { + output.writeInt64(15, objectsFailedToDeleteFromSink_); + } + if (bytesFailedToDeleteFromSink_ != 0L) { + output.writeInt64(16, bytesFailedToDeleteFromSink_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (objectsFoundFromSource_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, objectsFoundFromSource_); + } + if (bytesFoundFromSource_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, bytesFoundFromSource_); + } + if (objectsFoundOnlyFromSink_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(3, objectsFoundOnlyFromSink_); + } + if (bytesFoundOnlyFromSink_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, bytesFoundOnlyFromSink_); + } + if (objectsFromSourceSkippedBySync_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 5, objectsFromSourceSkippedBySync_); + } + if (bytesFromSourceSkippedBySync_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 6, bytesFromSourceSkippedBySync_); + } + if (objectsCopiedToSink_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(7, objectsCopiedToSink_); + } + if (bytesCopiedToSink_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(8, bytesCopiedToSink_); + } + if (objectsDeletedFromSource_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(9, objectsDeletedFromSource_); + } + if (bytesDeletedFromSource_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(10, bytesDeletedFromSource_); + } + if (objectsDeletedFromSink_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(11, objectsDeletedFromSink_); + } + if (bytesDeletedFromSink_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(12, bytesDeletedFromSink_); + } + if (objectsFromSourceFailed_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size(13, objectsFromSourceFailed_); + } + if (bytesFromSourceFailed_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(14, bytesFromSourceFailed_); + } + if (objectsFailedToDeleteFromSink_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 15, objectsFailedToDeleteFromSink_); + } + if (bytesFailedToDeleteFromSink_ != 0L) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 16, bytesFailedToDeleteFromSink_); + } + 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.storagetransfer.v1.proto.TransferTypes.TransferCounters)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters other = + (com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters) obj; + + if (getObjectsFoundFromSource() != other.getObjectsFoundFromSource()) return false; + if (getBytesFoundFromSource() != other.getBytesFoundFromSource()) return false; + if (getObjectsFoundOnlyFromSink() != other.getObjectsFoundOnlyFromSink()) return false; + if (getBytesFoundOnlyFromSink() != other.getBytesFoundOnlyFromSink()) return false; + if (getObjectsFromSourceSkippedBySync() != other.getObjectsFromSourceSkippedBySync()) + return false; + if (getBytesFromSourceSkippedBySync() != other.getBytesFromSourceSkippedBySync()) + return false; + if (getObjectsCopiedToSink() != other.getObjectsCopiedToSink()) return false; + if (getBytesCopiedToSink() != other.getBytesCopiedToSink()) return false; + if (getObjectsDeletedFromSource() != other.getObjectsDeletedFromSource()) return false; + if (getBytesDeletedFromSource() != other.getBytesDeletedFromSource()) return false; + if (getObjectsDeletedFromSink() != other.getObjectsDeletedFromSink()) return false; + if (getBytesDeletedFromSink() != other.getBytesDeletedFromSink()) return false; + if (getObjectsFromSourceFailed() != other.getObjectsFromSourceFailed()) return false; + if (getBytesFromSourceFailed() != other.getBytesFromSourceFailed()) return false; + if (getObjectsFailedToDeleteFromSink() != other.getObjectsFailedToDeleteFromSink()) + return false; + if (getBytesFailedToDeleteFromSink() != other.getBytesFailedToDeleteFromSink()) 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) + OBJECTS_FOUND_FROM_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getObjectsFoundFromSource()); + hash = (37 * hash) + BYTES_FOUND_FROM_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBytesFoundFromSource()); + hash = (37 * hash) + OBJECTS_FOUND_ONLY_FROM_SINK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getObjectsFoundOnlyFromSink()); + hash = (37 * hash) + BYTES_FOUND_ONLY_FROM_SINK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBytesFoundOnlyFromSink()); + hash = (37 * hash) + OBJECTS_FROM_SOURCE_SKIPPED_BY_SYNC_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashLong(getObjectsFromSourceSkippedBySync()); + hash = (37 * hash) + BYTES_FROM_SOURCE_SKIPPED_BY_SYNC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBytesFromSourceSkippedBySync()); + hash = (37 * hash) + OBJECTS_COPIED_TO_SINK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getObjectsCopiedToSink()); + hash = (37 * hash) + BYTES_COPIED_TO_SINK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBytesCopiedToSink()); + hash = (37 * hash) + OBJECTS_DELETED_FROM_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getObjectsDeletedFromSource()); + hash = (37 * hash) + BYTES_DELETED_FROM_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBytesDeletedFromSource()); + hash = (37 * hash) + OBJECTS_DELETED_FROM_SINK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getObjectsDeletedFromSink()); + hash = (37 * hash) + BYTES_DELETED_FROM_SINK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBytesDeletedFromSink()); + hash = (37 * hash) + OBJECTS_FROM_SOURCE_FAILED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getObjectsFromSourceFailed()); + hash = (37 * hash) + BYTES_FROM_SOURCE_FAILED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBytesFromSourceFailed()); + hash = (37 * hash) + OBJECTS_FAILED_TO_DELETE_FROM_SINK_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashLong(getObjectsFailedToDeleteFromSink()); + hash = (37 * hash) + BYTES_FAILED_TO_DELETE_FROM_SINK_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getBytesFailedToDeleteFromSink()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters 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.storagetransfer.v1.proto.TransferTypes.TransferCounters parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters 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.storagetransfer.v1.proto.TransferTypes.TransferCounters + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters + 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.storagetransfer.v1.proto.TransferTypes.TransferCounters parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters 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.storagetransfer.v1.proto.TransferTypes.TransferCounters prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A collection of counters that report the progress of a transfer operation.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.TransferCounters} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.TransferCounters) + com.google.storagetransfer.v1.proto.TransferTypes.TransferCountersOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferCounters_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferCounters_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.class, + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.Builder.class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.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(); + objectsFoundFromSource_ = 0L; + + bytesFoundFromSource_ = 0L; + + objectsFoundOnlyFromSink_ = 0L; + + bytesFoundOnlyFromSink_ = 0L; + + objectsFromSourceSkippedBySync_ = 0L; + + bytesFromSourceSkippedBySync_ = 0L; + + objectsCopiedToSink_ = 0L; + + bytesCopiedToSink_ = 0L; + + objectsDeletedFromSource_ = 0L; + + bytesDeletedFromSource_ = 0L; + + objectsDeletedFromSink_ = 0L; + + bytesDeletedFromSink_ = 0L; + + objectsFromSourceFailed_ = 0L; + + bytesFromSourceFailed_ = 0L; + + objectsFailedToDeleteFromSink_ = 0L; + + bytesFailedToDeleteFromSink_ = 0L; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferCounters_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters build() { + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters result = + new com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters(this); + result.objectsFoundFromSource_ = objectsFoundFromSource_; + result.bytesFoundFromSource_ = bytesFoundFromSource_; + result.objectsFoundOnlyFromSink_ = objectsFoundOnlyFromSink_; + result.bytesFoundOnlyFromSink_ = bytesFoundOnlyFromSink_; + result.objectsFromSourceSkippedBySync_ = objectsFromSourceSkippedBySync_; + result.bytesFromSourceSkippedBySync_ = bytesFromSourceSkippedBySync_; + result.objectsCopiedToSink_ = objectsCopiedToSink_; + result.bytesCopiedToSink_ = bytesCopiedToSink_; + result.objectsDeletedFromSource_ = objectsDeletedFromSource_; + result.bytesDeletedFromSource_ = bytesDeletedFromSource_; + result.objectsDeletedFromSink_ = objectsDeletedFromSink_; + result.bytesDeletedFromSink_ = bytesDeletedFromSink_; + result.objectsFromSourceFailed_ = objectsFromSourceFailed_; + result.bytesFromSourceFailed_ = bytesFromSourceFailed_; + result.objectsFailedToDeleteFromSink_ = objectsFailedToDeleteFromSink_; + result.bytesFailedToDeleteFromSink_ = bytesFailedToDeleteFromSink_; + 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.storagetransfer.v1.proto.TransferTypes.TransferCounters) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters + .getDefaultInstance()) return this; + if (other.getObjectsFoundFromSource() != 0L) { + setObjectsFoundFromSource(other.getObjectsFoundFromSource()); + } + if (other.getBytesFoundFromSource() != 0L) { + setBytesFoundFromSource(other.getBytesFoundFromSource()); + } + if (other.getObjectsFoundOnlyFromSink() != 0L) { + setObjectsFoundOnlyFromSink(other.getObjectsFoundOnlyFromSink()); + } + if (other.getBytesFoundOnlyFromSink() != 0L) { + setBytesFoundOnlyFromSink(other.getBytesFoundOnlyFromSink()); + } + if (other.getObjectsFromSourceSkippedBySync() != 0L) { + setObjectsFromSourceSkippedBySync(other.getObjectsFromSourceSkippedBySync()); + } + if (other.getBytesFromSourceSkippedBySync() != 0L) { + setBytesFromSourceSkippedBySync(other.getBytesFromSourceSkippedBySync()); + } + if (other.getObjectsCopiedToSink() != 0L) { + setObjectsCopiedToSink(other.getObjectsCopiedToSink()); + } + if (other.getBytesCopiedToSink() != 0L) { + setBytesCopiedToSink(other.getBytesCopiedToSink()); + } + if (other.getObjectsDeletedFromSource() != 0L) { + setObjectsDeletedFromSource(other.getObjectsDeletedFromSource()); + } + if (other.getBytesDeletedFromSource() != 0L) { + setBytesDeletedFromSource(other.getBytesDeletedFromSource()); + } + if (other.getObjectsDeletedFromSink() != 0L) { + setObjectsDeletedFromSink(other.getObjectsDeletedFromSink()); + } + if (other.getBytesDeletedFromSink() != 0L) { + setBytesDeletedFromSink(other.getBytesDeletedFromSink()); + } + if (other.getObjectsFromSourceFailed() != 0L) { + setObjectsFromSourceFailed(other.getObjectsFromSourceFailed()); + } + if (other.getBytesFromSourceFailed() != 0L) { + setBytesFromSourceFailed(other.getBytesFromSourceFailed()); + } + if (other.getObjectsFailedToDeleteFromSink() != 0L) { + setObjectsFailedToDeleteFromSink(other.getObjectsFailedToDeleteFromSink()); + } + if (other.getBytesFailedToDeleteFromSink() != 0L) { + setBytesFailedToDeleteFromSink(other.getBytesFailedToDeleteFromSink()); + } + 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.storagetransfer.v1.proto.TransferTypes.TransferCounters parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private long objectsFoundFromSource_; + /** + * + * + *
+       * Objects found in the data source that are scheduled to be transferred,
+       * excluding any that are filtered based on object conditions or skipped due
+       * to sync.
+       * 
+ * + * int64 objects_found_from_source = 1; + * + * @return The objectsFoundFromSource. + */ + @java.lang.Override + public long getObjectsFoundFromSource() { + return objectsFoundFromSource_; + } + /** + * + * + *
+       * Objects found in the data source that are scheduled to be transferred,
+       * excluding any that are filtered based on object conditions or skipped due
+       * to sync.
+       * 
+ * + * int64 objects_found_from_source = 1; + * + * @param value The objectsFoundFromSource to set. + * @return This builder for chaining. + */ + public Builder setObjectsFoundFromSource(long value) { + + objectsFoundFromSource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Objects found in the data source that are scheduled to be transferred,
+       * excluding any that are filtered based on object conditions or skipped due
+       * to sync.
+       * 
+ * + * int64 objects_found_from_source = 1; + * + * @return This builder for chaining. + */ + public Builder clearObjectsFoundFromSource() { + + objectsFoundFromSource_ = 0L; + onChanged(); + return this; + } + + private long bytesFoundFromSource_; + /** + * + * + *
+       * Bytes found in the data source that are scheduled to be transferred,
+       * excluding any that are filtered based on object conditions or skipped due
+       * to sync.
+       * 
+ * + * int64 bytes_found_from_source = 2; + * + * @return The bytesFoundFromSource. + */ + @java.lang.Override + public long getBytesFoundFromSource() { + return bytesFoundFromSource_; + } + /** + * + * + *
+       * Bytes found in the data source that are scheduled to be transferred,
+       * excluding any that are filtered based on object conditions or skipped due
+       * to sync.
+       * 
+ * + * int64 bytes_found_from_source = 2; + * + * @param value The bytesFoundFromSource to set. + * @return This builder for chaining. + */ + public Builder setBytesFoundFromSource(long value) { + + bytesFoundFromSource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Bytes found in the data source that are scheduled to be transferred,
+       * excluding any that are filtered based on object conditions or skipped due
+       * to sync.
+       * 
+ * + * int64 bytes_found_from_source = 2; + * + * @return This builder for chaining. + */ + public Builder clearBytesFoundFromSource() { + + bytesFoundFromSource_ = 0L; + onChanged(); + return this; + } + + private long objectsFoundOnlyFromSink_; + /** + * + * + *
+       * Objects found only in the data sink that are scheduled to be deleted.
+       * 
+ * + * int64 objects_found_only_from_sink = 3; + * + * @return The objectsFoundOnlyFromSink. + */ + @java.lang.Override + public long getObjectsFoundOnlyFromSink() { + return objectsFoundOnlyFromSink_; + } + /** + * + * + *
+       * Objects found only in the data sink that are scheduled to be deleted.
+       * 
+ * + * int64 objects_found_only_from_sink = 3; + * + * @param value The objectsFoundOnlyFromSink to set. + * @return This builder for chaining. + */ + public Builder setObjectsFoundOnlyFromSink(long value) { + + objectsFoundOnlyFromSink_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Objects found only in the data sink that are scheduled to be deleted.
+       * 
+ * + * int64 objects_found_only_from_sink = 3; + * + * @return This builder for chaining. + */ + public Builder clearObjectsFoundOnlyFromSink() { + + objectsFoundOnlyFromSink_ = 0L; + onChanged(); + return this; + } + + private long bytesFoundOnlyFromSink_; + /** + * + * + *
+       * Bytes found only in the data sink that are scheduled to be deleted.
+       * 
+ * + * int64 bytes_found_only_from_sink = 4; + * + * @return The bytesFoundOnlyFromSink. + */ + @java.lang.Override + public long getBytesFoundOnlyFromSink() { + return bytesFoundOnlyFromSink_; + } + /** + * + * + *
+       * Bytes found only in the data sink that are scheduled to be deleted.
+       * 
+ * + * int64 bytes_found_only_from_sink = 4; + * + * @param value The bytesFoundOnlyFromSink to set. + * @return This builder for chaining. + */ + public Builder setBytesFoundOnlyFromSink(long value) { + + bytesFoundOnlyFromSink_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Bytes found only in the data sink that are scheduled to be deleted.
+       * 
+ * + * int64 bytes_found_only_from_sink = 4; + * + * @return This builder for chaining. + */ + public Builder clearBytesFoundOnlyFromSink() { + + bytesFoundOnlyFromSink_ = 0L; + onChanged(); + return this; + } + + private long objectsFromSourceSkippedBySync_; + /** + * + * + *
+       * Objects in the data source that are not transferred because they already
+       * exist in the data sink.
+       * 
+ * + * int64 objects_from_source_skipped_by_sync = 5; + * + * @return The objectsFromSourceSkippedBySync. + */ + @java.lang.Override + public long getObjectsFromSourceSkippedBySync() { + return objectsFromSourceSkippedBySync_; + } + /** + * + * + *
+       * Objects in the data source that are not transferred because they already
+       * exist in the data sink.
+       * 
+ * + * int64 objects_from_source_skipped_by_sync = 5; + * + * @param value The objectsFromSourceSkippedBySync to set. + * @return This builder for chaining. + */ + public Builder setObjectsFromSourceSkippedBySync(long value) { + + objectsFromSourceSkippedBySync_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Objects in the data source that are not transferred because they already
+       * exist in the data sink.
+       * 
+ * + * int64 objects_from_source_skipped_by_sync = 5; + * + * @return This builder for chaining. + */ + public Builder clearObjectsFromSourceSkippedBySync() { + + objectsFromSourceSkippedBySync_ = 0L; + onChanged(); + return this; + } + + private long bytesFromSourceSkippedBySync_; + /** + * + * + *
+       * Bytes in the data source that are not transferred because they already
+       * exist in the data sink.
+       * 
+ * + * int64 bytes_from_source_skipped_by_sync = 6; + * + * @return The bytesFromSourceSkippedBySync. + */ + @java.lang.Override + public long getBytesFromSourceSkippedBySync() { + return bytesFromSourceSkippedBySync_; + } + /** + * + * + *
+       * Bytes in the data source that are not transferred because they already
+       * exist in the data sink.
+       * 
+ * + * int64 bytes_from_source_skipped_by_sync = 6; + * + * @param value The bytesFromSourceSkippedBySync to set. + * @return This builder for chaining. + */ + public Builder setBytesFromSourceSkippedBySync(long value) { + + bytesFromSourceSkippedBySync_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Bytes in the data source that are not transferred because they already
+       * exist in the data sink.
+       * 
+ * + * int64 bytes_from_source_skipped_by_sync = 6; + * + * @return This builder for chaining. + */ + public Builder clearBytesFromSourceSkippedBySync() { + + bytesFromSourceSkippedBySync_ = 0L; + onChanged(); + return this; + } + + private long objectsCopiedToSink_; + /** + * + * + *
+       * Objects that are copied to the data sink.
+       * 
+ * + * int64 objects_copied_to_sink = 7; + * + * @return The objectsCopiedToSink. + */ + @java.lang.Override + public long getObjectsCopiedToSink() { + return objectsCopiedToSink_; + } + /** + * + * + *
+       * Objects that are copied to the data sink.
+       * 
+ * + * int64 objects_copied_to_sink = 7; + * + * @param value The objectsCopiedToSink to set. + * @return This builder for chaining. + */ + public Builder setObjectsCopiedToSink(long value) { + + objectsCopiedToSink_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Objects that are copied to the data sink.
+       * 
+ * + * int64 objects_copied_to_sink = 7; + * + * @return This builder for chaining. + */ + public Builder clearObjectsCopiedToSink() { + + objectsCopiedToSink_ = 0L; + onChanged(); + return this; + } + + private long bytesCopiedToSink_; + /** + * + * + *
+       * Bytes that are copied to the data sink.
+       * 
+ * + * int64 bytes_copied_to_sink = 8; + * + * @return The bytesCopiedToSink. + */ + @java.lang.Override + public long getBytesCopiedToSink() { + return bytesCopiedToSink_; + } + /** + * + * + *
+       * Bytes that are copied to the data sink.
+       * 
+ * + * int64 bytes_copied_to_sink = 8; + * + * @param value The bytesCopiedToSink to set. + * @return This builder for chaining. + */ + public Builder setBytesCopiedToSink(long value) { + + bytesCopiedToSink_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Bytes that are copied to the data sink.
+       * 
+ * + * int64 bytes_copied_to_sink = 8; + * + * @return This builder for chaining. + */ + public Builder clearBytesCopiedToSink() { + + bytesCopiedToSink_ = 0L; + onChanged(); + return this; + } + + private long objectsDeletedFromSource_; + /** + * + * + *
+       * Objects that are deleted from the data source.
+       * 
+ * + * int64 objects_deleted_from_source = 9; + * + * @return The objectsDeletedFromSource. + */ + @java.lang.Override + public long getObjectsDeletedFromSource() { + return objectsDeletedFromSource_; + } + /** + * + * + *
+       * Objects that are deleted from the data source.
+       * 
+ * + * int64 objects_deleted_from_source = 9; + * + * @param value The objectsDeletedFromSource to set. + * @return This builder for chaining. + */ + public Builder setObjectsDeletedFromSource(long value) { + + objectsDeletedFromSource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Objects that are deleted from the data source.
+       * 
+ * + * int64 objects_deleted_from_source = 9; + * + * @return This builder for chaining. + */ + public Builder clearObjectsDeletedFromSource() { + + objectsDeletedFromSource_ = 0L; + onChanged(); + return this; + } + + private long bytesDeletedFromSource_; + /** + * + * + *
+       * Bytes that are deleted from the data source.
+       * 
+ * + * int64 bytes_deleted_from_source = 10; + * + * @return The bytesDeletedFromSource. + */ + @java.lang.Override + public long getBytesDeletedFromSource() { + return bytesDeletedFromSource_; + } + /** + * + * + *
+       * Bytes that are deleted from the data source.
+       * 
+ * + * int64 bytes_deleted_from_source = 10; + * + * @param value The bytesDeletedFromSource to set. + * @return This builder for chaining. + */ + public Builder setBytesDeletedFromSource(long value) { + + bytesDeletedFromSource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Bytes that are deleted from the data source.
+       * 
+ * + * int64 bytes_deleted_from_source = 10; + * + * @return This builder for chaining. + */ + public Builder clearBytesDeletedFromSource() { + + bytesDeletedFromSource_ = 0L; + onChanged(); + return this; + } + + private long objectsDeletedFromSink_; + /** + * + * + *
+       * Objects that are deleted from the data sink.
+       * 
+ * + * int64 objects_deleted_from_sink = 11; + * + * @return The objectsDeletedFromSink. + */ + @java.lang.Override + public long getObjectsDeletedFromSink() { + return objectsDeletedFromSink_; + } + /** + * + * + *
+       * Objects that are deleted from the data sink.
+       * 
+ * + * int64 objects_deleted_from_sink = 11; + * + * @param value The objectsDeletedFromSink to set. + * @return This builder for chaining. + */ + public Builder setObjectsDeletedFromSink(long value) { + + objectsDeletedFromSink_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Objects that are deleted from the data sink.
+       * 
+ * + * int64 objects_deleted_from_sink = 11; + * + * @return This builder for chaining. + */ + public Builder clearObjectsDeletedFromSink() { + + objectsDeletedFromSink_ = 0L; + onChanged(); + return this; + } + + private long bytesDeletedFromSink_; + /** + * + * + *
+       * Bytes that are deleted from the data sink.
+       * 
+ * + * int64 bytes_deleted_from_sink = 12; + * + * @return The bytesDeletedFromSink. + */ + @java.lang.Override + public long getBytesDeletedFromSink() { + return bytesDeletedFromSink_; + } + /** + * + * + *
+       * Bytes that are deleted from the data sink.
+       * 
+ * + * int64 bytes_deleted_from_sink = 12; + * + * @param value The bytesDeletedFromSink to set. + * @return This builder for chaining. + */ + public Builder setBytesDeletedFromSink(long value) { + + bytesDeletedFromSink_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Bytes that are deleted from the data sink.
+       * 
+ * + * int64 bytes_deleted_from_sink = 12; + * + * @return This builder for chaining. + */ + public Builder clearBytesDeletedFromSink() { + + bytesDeletedFromSink_ = 0L; + onChanged(); + return this; + } + + private long objectsFromSourceFailed_; + /** + * + * + *
+       * Objects in the data source that failed to be transferred or that failed
+       * to be deleted after being transferred.
+       * 
+ * + * int64 objects_from_source_failed = 13; + * + * @return The objectsFromSourceFailed. + */ + @java.lang.Override + public long getObjectsFromSourceFailed() { + return objectsFromSourceFailed_; + } + /** + * + * + *
+       * Objects in the data source that failed to be transferred or that failed
+       * to be deleted after being transferred.
+       * 
+ * + * int64 objects_from_source_failed = 13; + * + * @param value The objectsFromSourceFailed to set. + * @return This builder for chaining. + */ + public Builder setObjectsFromSourceFailed(long value) { + + objectsFromSourceFailed_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Objects in the data source that failed to be transferred or that failed
+       * to be deleted after being transferred.
+       * 
+ * + * int64 objects_from_source_failed = 13; + * + * @return This builder for chaining. + */ + public Builder clearObjectsFromSourceFailed() { + + objectsFromSourceFailed_ = 0L; + onChanged(); + return this; + } + + private long bytesFromSourceFailed_; + /** + * + * + *
+       * Bytes in the data source that failed to be transferred or that failed to
+       * be deleted after being transferred.
+       * 
+ * + * int64 bytes_from_source_failed = 14; + * + * @return The bytesFromSourceFailed. + */ + @java.lang.Override + public long getBytesFromSourceFailed() { + return bytesFromSourceFailed_; + } + /** + * + * + *
+       * Bytes in the data source that failed to be transferred or that failed to
+       * be deleted after being transferred.
+       * 
+ * + * int64 bytes_from_source_failed = 14; + * + * @param value The bytesFromSourceFailed to set. + * @return This builder for chaining. + */ + public Builder setBytesFromSourceFailed(long value) { + + bytesFromSourceFailed_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Bytes in the data source that failed to be transferred or that failed to
+       * be deleted after being transferred.
+       * 
+ * + * int64 bytes_from_source_failed = 14; + * + * @return This builder for chaining. + */ + public Builder clearBytesFromSourceFailed() { + + bytesFromSourceFailed_ = 0L; + onChanged(); + return this; + } + + private long objectsFailedToDeleteFromSink_; + /** + * + * + *
+       * Objects that failed to be deleted from the data sink.
+       * 
+ * + * int64 objects_failed_to_delete_from_sink = 15; + * + * @return The objectsFailedToDeleteFromSink. + */ + @java.lang.Override + public long getObjectsFailedToDeleteFromSink() { + return objectsFailedToDeleteFromSink_; + } + /** + * + * + *
+       * Objects that failed to be deleted from the data sink.
+       * 
+ * + * int64 objects_failed_to_delete_from_sink = 15; + * + * @param value The objectsFailedToDeleteFromSink to set. + * @return This builder for chaining. + */ + public Builder setObjectsFailedToDeleteFromSink(long value) { + + objectsFailedToDeleteFromSink_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Objects that failed to be deleted from the data sink.
+       * 
+ * + * int64 objects_failed_to_delete_from_sink = 15; + * + * @return This builder for chaining. + */ + public Builder clearObjectsFailedToDeleteFromSink() { + + objectsFailedToDeleteFromSink_ = 0L; + onChanged(); + return this; + } + + private long bytesFailedToDeleteFromSink_; + /** + * + * + *
+       * Bytes that failed to be deleted from the data sink.
+       * 
+ * + * int64 bytes_failed_to_delete_from_sink = 16; + * + * @return The bytesFailedToDeleteFromSink. + */ + @java.lang.Override + public long getBytesFailedToDeleteFromSink() { + return bytesFailedToDeleteFromSink_; + } + /** + * + * + *
+       * Bytes that failed to be deleted from the data sink.
+       * 
+ * + * int64 bytes_failed_to_delete_from_sink = 16; + * + * @param value The bytesFailedToDeleteFromSink to set. + * @return This builder for chaining. + */ + public Builder setBytesFailedToDeleteFromSink(long value) { + + bytesFailedToDeleteFromSink_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Bytes that failed to be deleted from the data sink.
+       * 
+ * + * int64 bytes_failed_to_delete_from_sink = 16; + * + * @return This builder for chaining. + */ + public Builder clearBytesFailedToDeleteFromSink() { + + bytesFailedToDeleteFromSink_ = 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.storagetransfer.v1.TransferCounters) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.TransferCounters) + private static final com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransferCounters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransferCounters(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.storagetransfer.v1.proto.TransferTypes.TransferCounters + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface NotificationConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.NotificationConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The `Topic.name` of the Cloud Pub/Sub topic to which to publish
+     * notifications. Must be of the format: `projects/{project}/topics/{topic}`.
+     * Not matching this format will result in an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The pubsubTopic. + */ + java.lang.String getPubsubTopic(); + /** + * + * + *
+     * Required. The `Topic.name` of the Cloud Pub/Sub topic to which to publish
+     * notifications. Must be of the format: `projects/{project}/topics/{topic}`.
+     * Not matching this format will result in an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for pubsubTopic. + */ + com.google.protobuf.ByteString getPubsubTopicBytes(); + + /** + * + * + *
+     * Event types for which a notification is desired. If empty, send
+     * notifications for all event types.
+     * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @return A list containing the eventTypes. + */ + java.util.List + getEventTypesList(); + /** + * + * + *
+     * Event types for which a notification is desired. If empty, send
+     * notifications for all event types.
+     * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @return The count of eventTypes. + */ + int getEventTypesCount(); + /** + * + * + *
+     * Event types for which a notification is desired. If empty, send
+     * notifications for all event types.
+     * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @param index The index of the element to return. + * @return The eventTypes at the given index. + */ + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType getEventTypes( + int index); + /** + * + * + *
+     * Event types for which a notification is desired. If empty, send
+     * notifications for all event types.
+     * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @return A list containing the enum numeric values on the wire for eventTypes. + */ + java.util.List getEventTypesValueList(); + /** + * + * + *
+     * Event types for which a notification is desired. If empty, send
+     * notifications for all event types.
+     * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of eventTypes at the given index. + */ + int getEventTypesValue(int index); + + /** + * + * + *
+     * Required. The desired format of the notification message payloads.
+     * 
+ * + * + * .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for payloadFormat. + */ + int getPayloadFormatValue(); + /** + * + * + *
+     * Required. The desired format of the notification message payloads.
+     * 
+ * + * + * .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The payloadFormat. + */ + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.PayloadFormat + getPayloadFormat(); + } + /** + * + * + *
+   * Specification to configure notifications published to Cloud Pub/Sub.
+   * Notifications will be published to the customer-provided topic using the
+   * following `PubsubMessage.attributes`:
+   * * `"eventType"`: one of the
+   * [EventType][google.storagetransfer.v1.NotificationConfig.EventType] values
+   * * `"payloadFormat"`: one of the
+   * [PayloadFormat][google.storagetransfer.v1.NotificationConfig.PayloadFormat]
+   * values
+   * * `"projectId"`: the
+   * [project_id][google.storagetransfer.v1.TransferOperation.project_id] of the
+   * `TransferOperation`
+   * * `"transferJobName"`: the
+   * [transfer_job_name][google.storagetransfer.v1.TransferOperation.transfer_job_name]
+   * of the `TransferOperation`
+   * * `"transferOperationName"`: the
+   * [name][google.storagetransfer.v1.TransferOperation.name] of the
+   * `TransferOperation`
+   * The `PubsubMessage.data` will contain a
+   * [TransferOperation][google.storagetransfer.v1.TransferOperation] resource
+   * formatted according to the specified `PayloadFormat`.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.NotificationConfig} + */ + public static final class NotificationConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.NotificationConfig) + NotificationConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use NotificationConfig.newBuilder() to construct. + private NotificationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private NotificationConfig() { + pubsubTopic_ = ""; + eventTypes_ = java.util.Collections.emptyList(); + payloadFormat_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new NotificationConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private NotificationConfig( + 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(); + + pubsubTopic_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + eventTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + eventTypes_.add(rawValue); + break; + } + case 18: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + eventTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + eventTypes_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 24: + { + int rawValue = input.readEnum(); + + payloadFormat_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + eventTypes_ = java.util.Collections.unmodifiableList(eventTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_NotificationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_NotificationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.class, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder.class); + } + + /** + * + * + *
+     * Enum for specifying event types for which notifications are to be
+     * published.
+     * Additional event types may be added in the future. Clients should either
+     * safely ignore unrecognized event types or explicitly specify which event
+     * types they are prepared to accept.
+     * 
+ * + * Protobuf enum {@code google.storagetransfer.v1.NotificationConfig.EventType} + */ + public enum EventType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Illegal value, to avoid allowing a default.
+       * 
+ * + * EVENT_TYPE_UNSPECIFIED = 0; + */ + EVENT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * `TransferOperation` completed with status
+       * [SUCCESS][google.storagetransfer.v1.TransferOperation.Status.SUCCESS].
+       * 
+ * + * TRANSFER_OPERATION_SUCCESS = 1; + */ + TRANSFER_OPERATION_SUCCESS(1), + /** + * + * + *
+       * `TransferOperation` completed with status
+       * [FAILED][google.storagetransfer.v1.TransferOperation.Status.FAILED].
+       * 
+ * + * TRANSFER_OPERATION_FAILED = 2; + */ + TRANSFER_OPERATION_FAILED(2), + /** + * + * + *
+       * `TransferOperation` completed with status
+       * [ABORTED][google.storagetransfer.v1.TransferOperation.Status.ABORTED].
+       * 
+ * + * TRANSFER_OPERATION_ABORTED = 3; + */ + TRANSFER_OPERATION_ABORTED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Illegal value, to avoid allowing a default.
+       * 
+ * + * EVENT_TYPE_UNSPECIFIED = 0; + */ + public static final int EVENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * `TransferOperation` completed with status
+       * [SUCCESS][google.storagetransfer.v1.TransferOperation.Status.SUCCESS].
+       * 
+ * + * TRANSFER_OPERATION_SUCCESS = 1; + */ + public static final int TRANSFER_OPERATION_SUCCESS_VALUE = 1; + /** + * + * + *
+       * `TransferOperation` completed with status
+       * [FAILED][google.storagetransfer.v1.TransferOperation.Status.FAILED].
+       * 
+ * + * TRANSFER_OPERATION_FAILED = 2; + */ + public static final int TRANSFER_OPERATION_FAILED_VALUE = 2; + /** + * + * + *
+       * `TransferOperation` completed with status
+       * [ABORTED][google.storagetransfer.v1.TransferOperation.Status.ABORTED].
+       * 
+ * + * TRANSFER_OPERATION_ABORTED = 3; + */ + public static final int TRANSFER_OPERATION_ABORTED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EventType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EventType forNumber(int value) { + switch (value) { + case 0: + return EVENT_TYPE_UNSPECIFIED; + case 1: + return TRANSFER_OPERATION_SUCCESS; + case 2: + return TRANSFER_OPERATION_FAILED; + case 3: + return TRANSFER_OPERATION_ABORTED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EventType findValueByNumber(int number) { + return EventType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final EventType[] VALUES = values(); + + public static EventType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EventType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.storagetransfer.v1.NotificationConfig.EventType) + } + + /** + * + * + *
+     * Enum for specifying the format of a notification message's payload.
+     * 
+ * + * Protobuf enum {@code google.storagetransfer.v1.NotificationConfig.PayloadFormat} + */ + public enum PayloadFormat implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Illegal value, to avoid allowing a default.
+       * 
+ * + * PAYLOAD_FORMAT_UNSPECIFIED = 0; + */ + PAYLOAD_FORMAT_UNSPECIFIED(0), + /** + * + * + *
+       * No payload is included with the notification.
+       * 
+ * + * NONE = 1; + */ + NONE(1), + /** + * + * + *
+       * `TransferOperation` is [formatted as a JSON
+       * response](https://developers.google.com/protocol-buffers/docs/proto3#json),
+       * in application/json.
+       * 
+ * + * JSON = 2; + */ + JSON(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Illegal value, to avoid allowing a default.
+       * 
+ * + * PAYLOAD_FORMAT_UNSPECIFIED = 0; + */ + public static final int PAYLOAD_FORMAT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * No payload is included with the notification.
+       * 
+ * + * NONE = 1; + */ + public static final int NONE_VALUE = 1; + /** + * + * + *
+       * `TransferOperation` is [formatted as a JSON
+       * response](https://developers.google.com/protocol-buffers/docs/proto3#json),
+       * in application/json.
+       * 
+ * + * JSON = 2; + */ + public static final int JSON_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PayloadFormat valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PayloadFormat forNumber(int value) { + switch (value) { + case 0: + return PAYLOAD_FORMAT_UNSPECIFIED; + case 1: + return NONE; + case 2: + return JSON; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PayloadFormat findValueByNumber(int number) { + return PayloadFormat.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final PayloadFormat[] VALUES = values(); + + public static PayloadFormat valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PayloadFormat(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.storagetransfer.v1.NotificationConfig.PayloadFormat) + } + + public static final int PUBSUB_TOPIC_FIELD_NUMBER = 1; + private volatile java.lang.Object pubsubTopic_; + /** + * + * + *
+     * Required. The `Topic.name` of the Cloud Pub/Sub topic to which to publish
+     * notifications. Must be of the format: `projects/{project}/topics/{topic}`.
+     * Not matching this format will result in an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. The `Topic.name` of the Cloud Pub/Sub topic to which to publish
+     * notifications. Must be of the format: `projects/{project}/topics/{topic}`.
+     * Not matching this format will result in an
+     * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+     * 
+ * + * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + + public static final int EVENT_TYPES_FIELD_NUMBER = 2; + private java.util.List eventTypes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType> + eventTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType>() { + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType + convert(java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType + result = + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + .EventType.valueOf(from); + return result == null + ? com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType + .UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+     * Event types for which a notification is desired. If empty, send
+     * notifications for all event types.
+     * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @return A list containing the eventTypes. + */ + @java.lang.Override + public java.util.List< + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType> + getEventTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType>( + eventTypes_, eventTypes_converter_); + } + /** + * + * + *
+     * Event types for which a notification is desired. If empty, send
+     * notifications for all event types.
+     * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @return The count of eventTypes. + */ + @java.lang.Override + public int getEventTypesCount() { + return eventTypes_.size(); + } + /** + * + * + *
+     * Event types for which a notification is desired. If empty, send
+     * notifications for all event types.
+     * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @param index The index of the element to return. + * @return The eventTypes at the given index. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType + getEventTypes(int index) { + return eventTypes_converter_.convert(eventTypes_.get(index)); + } + /** + * + * + *
+     * Event types for which a notification is desired. If empty, send
+     * notifications for all event types.
+     * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @return A list containing the enum numeric values on the wire for eventTypes. + */ + @java.lang.Override + public java.util.List getEventTypesValueList() { + return eventTypes_; + } + /** + * + * + *
+     * Event types for which a notification is desired. If empty, send
+     * notifications for all event types.
+     * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of eventTypes at the given index. + */ + @java.lang.Override + public int getEventTypesValue(int index) { + return eventTypes_.get(index); + } + + private int eventTypesMemoizedSerializedSize; + + public static final int PAYLOAD_FORMAT_FIELD_NUMBER = 3; + private int payloadFormat_; + /** + * + * + *
+     * Required. The desired format of the notification message payloads.
+     * 
+ * + * + * .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for payloadFormat. + */ + @java.lang.Override + public int getPayloadFormatValue() { + return payloadFormat_; + } + /** + * + * + *
+     * Required. The desired format of the notification message payloads.
+     * 
+ * + * + * .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The payloadFormat. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.PayloadFormat + getPayloadFormat() { + @SuppressWarnings("deprecation") + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.PayloadFormat result = + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.PayloadFormat + .valueOf(payloadFormat_); + return result == null + ? com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.PayloadFormat + .UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!getPubsubTopicBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pubsubTopic_); + } + if (getEventTypesList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(eventTypesMemoizedSerializedSize); + } + for (int i = 0; i < eventTypes_.size(); i++) { + output.writeEnumNoTag(eventTypes_.get(i)); + } + if (payloadFormat_ + != com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.PayloadFormat + .PAYLOAD_FORMAT_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, payloadFormat_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPubsubTopicBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pubsubTopic_); + } + { + int dataSize = 0; + for (int i = 0; i < eventTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(eventTypes_.get(i)); + } + size += dataSize; + if (!getEventTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + eventTypesMemoizedSerializedSize = dataSize; + } + if (payloadFormat_ + != com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.PayloadFormat + .PAYLOAD_FORMAT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, payloadFormat_); + } + 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.storagetransfer.v1.proto.TransferTypes.NotificationConfig)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig other = + (com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig) obj; + + if (!getPubsubTopic().equals(other.getPubsubTopic())) return false; + if (!eventTypes_.equals(other.eventTypes_)) return false; + if (payloadFormat_ != other.payloadFormat_) 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) + PUBSUB_TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getPubsubTopic().hashCode(); + if (getEventTypesCount() > 0) { + hash = (37 * hash) + EVENT_TYPES_FIELD_NUMBER; + hash = (53 * hash) + eventTypes_.hashCode(); + } + hash = (37 * hash) + PAYLOAD_FORMAT_FIELD_NUMBER; + hash = (53 * hash) + payloadFormat_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig 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.storagetransfer.v1.proto.TransferTypes.NotificationConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig 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.storagetransfer.v1.proto.TransferTypes.NotificationConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + 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.storagetransfer.v1.proto.TransferTypes.NotificationConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig 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.storagetransfer.v1.proto.TransferTypes.NotificationConfig 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; + } + /** + * + * + *
+     * Specification to configure notifications published to Cloud Pub/Sub.
+     * Notifications will be published to the customer-provided topic using the
+     * following `PubsubMessage.attributes`:
+     * * `"eventType"`: one of the
+     * [EventType][google.storagetransfer.v1.NotificationConfig.EventType] values
+     * * `"payloadFormat"`: one of the
+     * [PayloadFormat][google.storagetransfer.v1.NotificationConfig.PayloadFormat]
+     * values
+     * * `"projectId"`: the
+     * [project_id][google.storagetransfer.v1.TransferOperation.project_id] of the
+     * `TransferOperation`
+     * * `"transferJobName"`: the
+     * [transfer_job_name][google.storagetransfer.v1.TransferOperation.transfer_job_name]
+     * of the `TransferOperation`
+     * * `"transferOperationName"`: the
+     * [name][google.storagetransfer.v1.TransferOperation.name] of the
+     * `TransferOperation`
+     * The `PubsubMessage.data` will contain a
+     * [TransferOperation][google.storagetransfer.v1.TransferOperation] resource
+     * formatted according to the specified `PayloadFormat`.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.NotificationConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.NotificationConfig) + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_NotificationConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_NotificationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.class, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder.class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.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(); + pubsubTopic_ = ""; + + eventTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + payloadFormat_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_NotificationConfig_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig build() { + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig result = + new com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig(this); + int from_bitField0_ = bitField0_; + result.pubsubTopic_ = pubsubTopic_; + if (((bitField0_ & 0x00000001) != 0)) { + eventTypes_ = java.util.Collections.unmodifiableList(eventTypes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.eventTypes_ = eventTypes_; + result.payloadFormat_ = payloadFormat_; + 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.storagetransfer.v1.proto.TransferTypes.NotificationConfig) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + .getDefaultInstance()) return this; + if (!other.getPubsubTopic().isEmpty()) { + pubsubTopic_ = other.pubsubTopic_; + onChanged(); + } + if (!other.eventTypes_.isEmpty()) { + if (eventTypes_.isEmpty()) { + eventTypes_ = other.eventTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEventTypesIsMutable(); + eventTypes_.addAll(other.eventTypes_); + } + onChanged(); + } + if (other.payloadFormat_ != 0) { + setPayloadFormatValue(other.getPayloadFormatValue()); + } + 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.storagetransfer.v1.proto.TransferTypes.NotificationConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object pubsubTopic_ = ""; + /** + * + * + *
+       * Required. The `Topic.name` of the Cloud Pub/Sub topic to which to publish
+       * notifications. Must be of the format: `projects/{project}/topics/{topic}`.
+       * Not matching this format will result in an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+       * Required. The `Topic.name` of the Cloud Pub/Sub topic to which to publish
+       * notifications. Must be of the format: `projects/{project}/topics/{topic}`.
+       * Not matching this format will result in an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+       * Required. The `Topic.name` of the Cloud Pub/Sub topic to which to publish
+       * notifications. Must be of the format: `projects/{project}/topics/{topic}`.
+       * Not matching this format will result in an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+       * Required. The `Topic.name` of the Cloud Pub/Sub topic to which to publish
+       * notifications. Must be of the format: `projects/{project}/topics/{topic}`.
+       * Not matching this format will result in an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearPubsubTopic() { + + pubsubTopic_ = getDefaultInstance().getPubsubTopic(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The `Topic.name` of the Cloud Pub/Sub topic to which to publish
+       * notifications. Must be of the format: `projects/{project}/topics/{topic}`.
+       * Not matching this format will result in an
+       * [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error.
+       * 
+ * + * string pubsub_topic = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + + private java.util.List eventTypes_ = java.util.Collections.emptyList(); + + private void ensureEventTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + eventTypes_ = new java.util.ArrayList(eventTypes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Event types for which a notification is desired. If empty, send
+       * notifications for all event types.
+       * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @return A list containing the eventTypes. + */ + public java.util.List< + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType> + getEventTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType>( + eventTypes_, eventTypes_converter_); + } + /** + * + * + *
+       * Event types for which a notification is desired. If empty, send
+       * notifications for all event types.
+       * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @return The count of eventTypes. + */ + public int getEventTypesCount() { + return eventTypes_.size(); + } + /** + * + * + *
+       * Event types for which a notification is desired. If empty, send
+       * notifications for all event types.
+       * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @param index The index of the element to return. + * @return The eventTypes at the given index. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType + getEventTypes(int index) { + return eventTypes_converter_.convert(eventTypes_.get(index)); + } + /** + * + * + *
+       * Event types for which a notification is desired. If empty, send
+       * notifications for all event types.
+       * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @param index The index to set the value at. + * @param value The eventTypes to set. + * @return This builder for chaining. + */ + public Builder setEventTypes( + int index, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventTypesIsMutable(); + eventTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Event types for which a notification is desired. If empty, send
+       * notifications for all event types.
+       * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @param value The eventTypes to add. + * @return This builder for chaining. + */ + public Builder addEventTypes( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEventTypesIsMutable(); + eventTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+       * Event types for which a notification is desired. If empty, send
+       * notifications for all event types.
+       * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @param values The eventTypes to add. + * @return This builder for chaining. + */ + public Builder addAllEventTypes( + java.lang.Iterable< + ? extends + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + .EventType> + values) { + ensureEventTypesIsMutable(); + for (com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.EventType value : + values) { + eventTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+       * Event types for which a notification is desired. If empty, send
+       * notifications for all event types.
+       * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearEventTypes() { + eventTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Event types for which a notification is desired. If empty, send
+       * notifications for all event types.
+       * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @return A list containing the enum numeric values on the wire for eventTypes. + */ + public java.util.List getEventTypesValueList() { + return java.util.Collections.unmodifiableList(eventTypes_); + } + /** + * + * + *
+       * Event types for which a notification is desired. If empty, send
+       * notifications for all event types.
+       * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of eventTypes at the given index. + */ + public int getEventTypesValue(int index) { + return eventTypes_.get(index); + } + /** + * + * + *
+       * Event types for which a notification is desired. If empty, send
+       * notifications for all event types.
+       * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of eventTypes at the given index. + * @return This builder for chaining. + */ + public Builder setEventTypesValue(int index, int value) { + ensureEventTypesIsMutable(); + eventTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Event types for which a notification is desired. If empty, send
+       * notifications for all event types.
+       * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @param value The enum numeric value on the wire for eventTypes to add. + * @return This builder for chaining. + */ + public Builder addEventTypesValue(int value) { + ensureEventTypesIsMutable(); + eventTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Event types for which a notification is desired. If empty, send
+       * notifications for all event types.
+       * 
+ * + * repeated .google.storagetransfer.v1.NotificationConfig.EventType event_types = 2; + * + * + * @param values The enum numeric values on the wire for eventTypes to add. + * @return This builder for chaining. + */ + public Builder addAllEventTypesValue(java.lang.Iterable values) { + ensureEventTypesIsMutable(); + for (int value : values) { + eventTypes_.add(value); + } + onChanged(); + return this; + } + + private int payloadFormat_ = 0; + /** + * + * + *
+       * Required. The desired format of the notification message payloads.
+       * 
+ * + * + * .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for payloadFormat. + */ + @java.lang.Override + public int getPayloadFormatValue() { + return payloadFormat_; + } + /** + * + * + *
+       * Required. The desired format of the notification message payloads.
+       * 
+ * + * + * .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for payloadFormat to set. + * @return This builder for chaining. + */ + public Builder setPayloadFormatValue(int value) { + + payloadFormat_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The desired format of the notification message payloads.
+       * 
+ * + * + * .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The payloadFormat. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.PayloadFormat + getPayloadFormat() { + @SuppressWarnings("deprecation") + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.PayloadFormat result = + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.PayloadFormat + .valueOf(payloadFormat_); + return result == null + ? com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.PayloadFormat + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Required. The desired format of the notification message payloads.
+       * 
+ * + * + * .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The payloadFormat to set. + * @return This builder for chaining. + */ + public Builder setPayloadFormat( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.PayloadFormat + value) { + if (value == null) { + throw new NullPointerException(); + } + + payloadFormat_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The desired format of the notification message payloads.
+       * 
+ * + * + * .google.storagetransfer.v1.NotificationConfig.PayloadFormat payload_format = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearPayloadFormat() { + + payloadFormat_ = 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.storagetransfer.v1.NotificationConfig) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.NotificationConfig) + private static final com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NotificationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new NotificationConfig(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.storagetransfer.v1.proto.TransferTypes.NotificationConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TransferOperationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storagetransfer.v1.TransferOperation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A globally unique ID assigned by the system.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * A globally unique ID assigned by the system.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * The ID of the Google Cloud Platform Project that owns the operation.
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + java.lang.String getProjectId(); + /** + * + * + *
+     * The ID of the Google Cloud Platform Project that owns the operation.
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + com.google.protobuf.ByteString getProjectIdBytes(); + + /** + * + * + *
+     * Transfer specification.
+     * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + * + * @return Whether the transferSpec field is set. + */ + boolean hasTransferSpec(); + /** + * + * + *
+     * Transfer specification.
+     * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + * + * @return The transferSpec. + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec getTransferSpec(); + /** + * + * + *
+     * Transfer specification.
+     * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder + getTransferSpecOrBuilder(); + + /** + * + * + *
+     * Notification configuration.
+     * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + * + * @return Whether the notificationConfig field is set. + */ + boolean hasNotificationConfig(); + /** + * + * + *
+     * Notification configuration.
+     * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + * + * @return The notificationConfig. + */ + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig getNotificationConfig(); + /** + * + * + *
+     * Notification configuration.
+     * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + */ + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder + getNotificationConfigOrBuilder(); + + /** + * + * + *
+     * Start time of this transfer execution.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+     * Start time of this transfer execution.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+     * Start time of this transfer execution.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+     * End time of this transfer execution.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+     * End time of this transfer execution.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+     * End time of this transfer execution.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+     * Status of the transfer operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferOperation.Status status = 6; + * + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * + * + *
+     * Status of the transfer operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferOperation.Status status = 6; + * + * @return The status. + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Status getStatus(); + + /** + * + * + *
+     * Information about the progress of the transfer operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + * + * @return Whether the counters field is set. + */ + boolean hasCounters(); + /** + * + * + *
+     * Information about the progress of the transfer operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + * + * @return The counters. + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters getCounters(); + /** + * + * + *
+     * Information about the progress of the transfer operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + */ + com.google.storagetransfer.v1.proto.TransferTypes.TransferCountersOrBuilder + getCountersOrBuilder(); + + /** + * + * + *
+     * Summarizes errors encountered with sample error log entries.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + java.util.List + getErrorBreakdownsList(); + /** + * + * + *
+     * Summarizes errors encountered with sample error log entries.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary getErrorBreakdowns(int index); + /** + * + * + *
+     * Summarizes errors encountered with sample error log entries.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + int getErrorBreakdownsCount(); + /** + * + * + *
+     * Summarizes errors encountered with sample error log entries.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + java.util.List< + ? extends com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummaryOrBuilder> + getErrorBreakdownsOrBuilderList(); + /** + * + * + *
+     * Summarizes errors encountered with sample error log entries.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummaryOrBuilder + getErrorBreakdownsOrBuilder(int index); + + /** + * + * + *
+     * The name of the transfer job that triggers this transfer operation.
+     * 
+ * + * string transfer_job_name = 9; + * + * @return The transferJobName. + */ + java.lang.String getTransferJobName(); + /** + * + * + *
+     * The name of the transfer job that triggers this transfer operation.
+     * 
+ * + * string transfer_job_name = 9; + * + * @return The bytes for transferJobName. + */ + com.google.protobuf.ByteString getTransferJobNameBytes(); + } + /** + * + * + *
+   * A description of the execution of a transfer.
+   * 
+ * + * Protobuf type {@code google.storagetransfer.v1.TransferOperation} + */ + public static final class TransferOperation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storagetransfer.v1.TransferOperation) + TransferOperationOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransferOperation.newBuilder() to construct. + private TransferOperation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransferOperation() { + name_ = ""; + projectId_ = ""; + status_ = 0; + errorBreakdowns_ = java.util.Collections.emptyList(); + transferJobName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransferOperation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransferOperation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + projectId_ = s; + break; + } + case 26: + { + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder subBuilder = + null; + if (transferSpec_ != null) { + subBuilder = transferSpec_.toBuilder(); + } + transferSpec_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transferSpec_); + transferSpec_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + 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 42: + { + 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 48: + { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } + case 58: + { + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.Builder + subBuilder = null; + if (counters_ != null) { + subBuilder = counters_.toBuilder(); + } + counters_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(counters_); + counters_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + errorBreakdowns_ = + new java.util.ArrayList< + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary>(); + mutable_bitField0_ |= 0x00000001; + } + errorBreakdowns_.add( + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.parser(), + extensionRegistry)); + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + transferJobName_ = s; + break; + } + case 82: + { + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder + subBuilder = null; + if (notificationConfig_ != null) { + subBuilder = notificationConfig_.toBuilder(); + } + notificationConfig_ = + input.readMessage( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(notificationConfig_); + notificationConfig_ = 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)) { + errorBreakdowns_ = java.util.Collections.unmodifiableList(errorBreakdowns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferOperation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferOperation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.class, + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Builder.class); + } + + /** + * + * + *
+     * The status of a TransferOperation.
+     * 
+ * + * Protobuf enum {@code google.storagetransfer.v1.TransferOperation.Status} + */ + public enum Status implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Zero is an illegal value.
+       * 
+ * + * STATUS_UNSPECIFIED = 0; + */ + STATUS_UNSPECIFIED(0), + /** + * + * + *
+       * In progress.
+       * 
+ * + * IN_PROGRESS = 1; + */ + IN_PROGRESS(1), + /** + * + * + *
+       * Paused.
+       * 
+ * + * PAUSED = 2; + */ + PAUSED(2), + /** + * + * + *
+       * Completed successfully.
+       * 
+ * + * SUCCESS = 3; + */ + SUCCESS(3), + /** + * + * + *
+       * Terminated due to an unrecoverable failure.
+       * 
+ * + * FAILED = 4; + */ + FAILED(4), + /** + * + * + *
+       * Aborted by the user.
+       * 
+ * + * ABORTED = 5; + */ + ABORTED(5), + /** + * + * + *
+       * Temporarily delayed by the system. No user action is required.
+       * 
+ * + * QUEUED = 6; + */ + QUEUED(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Zero is an illegal value.
+       * 
+ * + * STATUS_UNSPECIFIED = 0; + */ + public static final int STATUS_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * In progress.
+       * 
+ * + * IN_PROGRESS = 1; + */ + public static final int IN_PROGRESS_VALUE = 1; + /** + * + * + *
+       * Paused.
+       * 
+ * + * PAUSED = 2; + */ + public static final int PAUSED_VALUE = 2; + /** + * + * + *
+       * Completed successfully.
+       * 
+ * + * SUCCESS = 3; + */ + public static final int SUCCESS_VALUE = 3; + /** + * + * + *
+       * Terminated due to an unrecoverable failure.
+       * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + /** + * + * + *
+       * Aborted by the user.
+       * 
+ * + * ABORTED = 5; + */ + public static final int ABORTED_VALUE = 5; + /** + * + * + *
+       * Temporarily delayed by the system. No user action is required.
+       * 
+ * + * QUEUED = 6; + */ + public static final int QUEUED_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Status valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Status forNumber(int value) { + switch (value) { + case 0: + return STATUS_UNSPECIFIED; + case 1: + return IN_PROGRESS; + case 2: + return PAUSED; + case 3: + return SUCCESS; + case 4: + return FAILED; + case 5: + return ABORTED; + case 6: + return QUEUED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Status findValueByNumber(int number) { + return Status.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Status[] VALUES = values(); + + public static Status valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Status(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.storagetransfer.v1.TransferOperation.Status) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * A globally unique ID assigned by the system.
+     * 
+ * + * 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 globally unique ID assigned by the system.
+     * 
+ * + * 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 PROJECT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object projectId_; + /** + * + * + *
+     * The ID of the Google Cloud Platform Project that owns the operation.
+     * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + @java.lang.Override + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } + } + /** + * + * + *
+     * The ID of the Google Cloud Platform Project that owns the operation.
+     * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRANSFER_SPEC_FIELD_NUMBER = 3; + private com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec transferSpec_; + /** + * + * + *
+     * Transfer specification.
+     * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + * + * @return Whether the transferSpec field is set. + */ + @java.lang.Override + public boolean hasTransferSpec() { + return transferSpec_ != null; + } + /** + * + * + *
+     * Transfer specification.
+     * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + * + * @return The transferSpec. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec getTransferSpec() { + return transferSpec_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.getDefaultInstance() + : transferSpec_; + } + /** + * + * + *
+     * Transfer specification.
+     * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder + getTransferSpecOrBuilder() { + return getTransferSpec(); + } + + public static final int NOTIFICATION_CONFIG_FIELD_NUMBER = 10; + private com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + notificationConfig_; + /** + * + * + *
+     * Notification configuration.
+     * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + * + * @return Whether the notificationConfig field is set. + */ + @java.lang.Override + public boolean hasNotificationConfig() { + return notificationConfig_ != null; + } + /** + * + * + *
+     * Notification configuration.
+     * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + * + * @return The notificationConfig. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + getNotificationConfig() { + return notificationConfig_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + .getDefaultInstance() + : notificationConfig_; + } + /** + * + * + *
+     * Notification configuration.
+     * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder + getNotificationConfigOrBuilder() { + return getNotificationConfig(); + } + + public static final int START_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+     * Start time of this transfer execution.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+     * Start time of this transfer execution.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+     * Start time of this transfer execution.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+     * End time of this transfer execution.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+     * End time of this transfer execution.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+     * End time of this transfer execution.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int STATUS_FIELD_NUMBER = 6; + private int status_; + /** + * + * + *
+     * Status of the transfer operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferOperation.Status status = 6; + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + /** + * + * + *
+     * Status of the transfer operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferOperation.Status status = 6; + * + * @return The status. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Status getStatus() { + @SuppressWarnings("deprecation") + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Status result = + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Status.valueOf( + status_); + return result == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Status.UNRECOGNIZED + : result; + } + + public static final int COUNTERS_FIELD_NUMBER = 7; + private com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters counters_; + /** + * + * + *
+     * Information about the progress of the transfer operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + * + * @return Whether the counters field is set. + */ + @java.lang.Override + public boolean hasCounters() { + return counters_ != null; + } + /** + * + * + *
+     * Information about the progress of the transfer operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + * + * @return The counters. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters getCounters() { + return counters_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.getDefaultInstance() + : counters_; + } + /** + * + * + *
+     * Information about the progress of the transfer operation.
+     * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferCountersOrBuilder + getCountersOrBuilder() { + return getCounters(); + } + + public static final int ERROR_BREAKDOWNS_FIELD_NUMBER = 8; + private java.util.List + errorBreakdowns_; + /** + * + * + *
+     * Summarizes errors encountered with sample error log entries.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + @java.lang.Override + public java.util.List + getErrorBreakdownsList() { + return errorBreakdowns_; + } + /** + * + * + *
+     * Summarizes errors encountered with sample error log entries.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummaryOrBuilder> + getErrorBreakdownsOrBuilderList() { + return errorBreakdowns_; + } + /** + * + * + *
+     * Summarizes errors encountered with sample error log entries.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + @java.lang.Override + public int getErrorBreakdownsCount() { + return errorBreakdowns_.size(); + } + /** + * + * + *
+     * Summarizes errors encountered with sample error log entries.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary getErrorBreakdowns( + int index) { + return errorBreakdowns_.get(index); + } + /** + * + * + *
+     * Summarizes errors encountered with sample error log entries.
+     * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummaryOrBuilder + getErrorBreakdownsOrBuilder(int index) { + return errorBreakdowns_.get(index); + } + + public static final int TRANSFER_JOB_NAME_FIELD_NUMBER = 9; + private volatile java.lang.Object transferJobName_; + /** + * + * + *
+     * The name of the transfer job that triggers this transfer operation.
+     * 
+ * + * string transfer_job_name = 9; + * + * @return The transferJobName. + */ + @java.lang.Override + public java.lang.String getTransferJobName() { + java.lang.Object ref = transferJobName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transferJobName_ = s; + return s; + } + } + /** + * + * + *
+     * The name of the transfer job that triggers this transfer operation.
+     * 
+ * + * string transfer_job_name = 9; + * + * @return The bytes for transferJobName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTransferJobNameBytes() { + java.lang.Object ref = transferJobName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transferJobName_ = 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 (!getProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, projectId_); + } + if (transferSpec_ != null) { + output.writeMessage(3, getTransferSpec()); + } + if (startTime_ != null) { + output.writeMessage(4, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(5, getEndTime()); + } + if (status_ + != com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Status + .STATUS_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, status_); + } + if (counters_ != null) { + output.writeMessage(7, getCounters()); + } + for (int i = 0; i < errorBreakdowns_.size(); i++) { + output.writeMessage(8, errorBreakdowns_.get(i)); + } + if (!getTransferJobNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, transferJobName_); + } + if (notificationConfig_ != null) { + output.writeMessage(10, getNotificationConfig()); + } + 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 (!getProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, projectId_); + } + if (transferSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTransferSpec()); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndTime()); + } + if (status_ + != com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Status + .STATUS_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, status_); + } + if (counters_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCounters()); + } + for (int i = 0; i < errorBreakdowns_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, errorBreakdowns_.get(i)); + } + if (!getTransferJobNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, transferJobName_); + } + if (notificationConfig_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(10, getNotificationConfig()); + } + 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.storagetransfer.v1.proto.TransferTypes.TransferOperation)) { + return super.equals(obj); + } + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation other = + (com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation) obj; + + if (!getName().equals(other.getName())) return false; + if (!getProjectId().equals(other.getProjectId())) return false; + if (hasTransferSpec() != other.hasTransferSpec()) return false; + if (hasTransferSpec()) { + if (!getTransferSpec().equals(other.getTransferSpec())) return false; + } + if (hasNotificationConfig() != other.hasNotificationConfig()) return false; + if (hasNotificationConfig()) { + if (!getNotificationConfig().equals(other.getNotificationConfig())) 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 (status_ != other.status_) return false; + if (hasCounters() != other.hasCounters()) return false; + if (hasCounters()) { + if (!getCounters().equals(other.getCounters())) return false; + } + if (!getErrorBreakdownsList().equals(other.getErrorBreakdownsList())) return false; + if (!getTransferJobName().equals(other.getTransferJobName())) 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) + PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProjectId().hashCode(); + if (hasTransferSpec()) { + hash = (37 * hash) + TRANSFER_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getTransferSpec().hashCode(); + } + if (hasNotificationConfig()) { + hash = (37 * hash) + NOTIFICATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNotificationConfig().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) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + if (hasCounters()) { + hash = (37 * hash) + COUNTERS_FIELD_NUMBER; + hash = (53 * hash) + getCounters().hashCode(); + } + if (getErrorBreakdownsCount() > 0) { + hash = (37 * hash) + ERROR_BREAKDOWNS_FIELD_NUMBER; + hash = (53 * hash) + getErrorBreakdownsList().hashCode(); + } + hash = (37 * hash) + TRANSFER_JOB_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTransferJobName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation 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.storagetransfer.v1.proto.TransferTypes.TransferOperation parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation 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.storagetransfer.v1.proto.TransferTypes.TransferOperation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation + 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.storagetransfer.v1.proto.TransferTypes.TransferOperation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation 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.storagetransfer.v1.proto.TransferTypes.TransferOperation prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A description of the execution of a transfer.
+     * 
+ * + * Protobuf type {@code google.storagetransfer.v1.TransferOperation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storagetransfer.v1.TransferOperation) + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferOperation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferOperation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.class, + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Builder.class); + } + + // Construct using + // com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getErrorBreakdownsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + projectId_ = ""; + + if (transferSpecBuilder_ == null) { + transferSpec_ = null; + } else { + transferSpec_ = null; + transferSpecBuilder_ = null; + } + if (notificationConfigBuilder_ == null) { + notificationConfig_ = null; + } else { + notificationConfig_ = null; + notificationConfigBuilder_ = null; + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + status_ = 0; + + if (countersBuilder_ == null) { + counters_ = null; + } else { + counters_ = null; + countersBuilder_ = null; + } + if (errorBreakdownsBuilder_ == null) { + errorBreakdowns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + errorBreakdownsBuilder_.clear(); + } + transferJobName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storagetransfer.v1.proto.TransferTypes + .internal_static_google_storagetransfer_v1_TransferOperation_descriptor; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation + getDefaultInstanceForType() { + return com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation build() { + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation buildPartial() { + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation result = + new com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.projectId_ = projectId_; + if (transferSpecBuilder_ == null) { + result.transferSpec_ = transferSpec_; + } else { + result.transferSpec_ = transferSpecBuilder_.build(); + } + if (notificationConfigBuilder_ == null) { + result.notificationConfig_ = notificationConfig_; + } else { + result.notificationConfig_ = notificationConfigBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + result.status_ = status_; + if (countersBuilder_ == null) { + result.counters_ = counters_; + } else { + result.counters_ = countersBuilder_.build(); + } + if (errorBreakdownsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + errorBreakdowns_ = java.util.Collections.unmodifiableList(errorBreakdowns_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.errorBreakdowns_ = errorBreakdowns_; + } else { + result.errorBreakdowns_ = errorBreakdownsBuilder_.build(); + } + result.transferJobName_ = transferJobName_; + 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.storagetransfer.v1.proto.TransferTypes.TransferOperation) { + return mergeFrom( + (com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation other) { + if (other + == com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getProjectId().isEmpty()) { + projectId_ = other.projectId_; + onChanged(); + } + if (other.hasTransferSpec()) { + mergeTransferSpec(other.getTransferSpec()); + } + if (other.hasNotificationConfig()) { + mergeNotificationConfig(other.getNotificationConfig()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + if (other.hasCounters()) { + mergeCounters(other.getCounters()); + } + if (errorBreakdownsBuilder_ == null) { + if (!other.errorBreakdowns_.isEmpty()) { + if (errorBreakdowns_.isEmpty()) { + errorBreakdowns_ = other.errorBreakdowns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureErrorBreakdownsIsMutable(); + errorBreakdowns_.addAll(other.errorBreakdowns_); + } + onChanged(); + } + } else { + if (!other.errorBreakdowns_.isEmpty()) { + if (errorBreakdownsBuilder_.isEmpty()) { + errorBreakdownsBuilder_.dispose(); + errorBreakdownsBuilder_ = null; + errorBreakdowns_ = other.errorBreakdowns_; + bitField0_ = (bitField0_ & ~0x00000001); + errorBreakdownsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getErrorBreakdownsFieldBuilder() + : null; + } else { + errorBreakdownsBuilder_.addAllMessages(other.errorBreakdowns_); + } + } + } + if (!other.getTransferJobName().isEmpty()) { + transferJobName_ = other.transferJobName_; + 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.storagetransfer.v1.proto.TransferTypes.TransferOperation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * A globally unique ID assigned by the system.
+       * 
+ * + * 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 globally unique ID assigned by the system.
+       * 
+ * + * 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 globally unique ID assigned by the system.
+       * 
+ * + * 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 globally unique ID assigned by the system.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * A globally unique ID assigned by the system.
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object projectId_ = ""; + /** + * + * + *
+       * The ID of the Google Cloud Platform Project that owns the operation.
+       * 
+ * + * string project_id = 2; + * + * @return The projectId. + */ + public java.lang.String getProjectId() { + java.lang.Object ref = projectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + projectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The ID of the Google Cloud Platform Project that owns the operation.
+       * 
+ * + * string project_id = 2; + * + * @return The bytes for projectId. + */ + public com.google.protobuf.ByteString getProjectIdBytes() { + java.lang.Object ref = projectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + projectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The ID of the Google Cloud Platform Project that owns the operation.
+       * 
+ * + * string project_id = 2; + * + * @param value The projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + projectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The ID of the Google Cloud Platform Project that owns the operation.
+       * 
+ * + * string project_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearProjectId() { + + projectId_ = getDefaultInstance().getProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+       * The ID of the Google Cloud Platform Project that owns the operation.
+       * 
+ * + * string project_id = 2; + * + * @param value The bytes for projectId to set. + * @return This builder for chaining. + */ + public Builder setProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + projectId_ = value; + onChanged(); + return this; + } + + private com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec transferSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder> + transferSpecBuilder_; + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + * + * @return Whether the transferSpec field is set. + */ + public boolean hasTransferSpec() { + return transferSpecBuilder_ != null || transferSpec_ != null; + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + * + * @return The transferSpec. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec getTransferSpec() { + if (transferSpecBuilder_ == null) { + return transferSpec_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.getDefaultInstance() + : transferSpec_; + } else { + return transferSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + */ + public Builder setTransferSpec( + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec value) { + if (transferSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transferSpec_ = value; + onChanged(); + } else { + transferSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + */ + public Builder setTransferSpec( + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder builderForValue) { + if (transferSpecBuilder_ == null) { + transferSpec_ = builderForValue.build(); + onChanged(); + } else { + transferSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + */ + public Builder mergeTransferSpec( + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec value) { + if (transferSpecBuilder_ == null) { + if (transferSpec_ != null) { + transferSpec_ = + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.newBuilder( + transferSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + transferSpec_ = value; + } + onChanged(); + } else { + transferSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + */ + public Builder clearTransferSpec() { + if (transferSpecBuilder_ == null) { + transferSpec_ = null; + onChanged(); + } else { + transferSpec_ = null; + transferSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder + getTransferSpecBuilder() { + + onChanged(); + return getTransferSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder + getTransferSpecOrBuilder() { + if (transferSpecBuilder_ != null) { + return transferSpecBuilder_.getMessageOrBuilder(); + } else { + return transferSpec_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.getDefaultInstance() + : transferSpec_; + } + } + /** + * + * + *
+       * Transfer specification.
+       * 
+ * + * .google.storagetransfer.v1.TransferSpec transfer_spec = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder> + getTransferSpecFieldBuilder() { + if (transferSpecBuilder_ == null) { + transferSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpec.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferSpecOrBuilder>( + getTransferSpec(), getParentForChildren(), isClean()); + transferSpec_ = null; + } + return transferSpecBuilder_; + } + + private com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + notificationConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder> + notificationConfigBuilder_; + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + * + * @return Whether the notificationConfig field is set. + */ + public boolean hasNotificationConfig() { + return notificationConfigBuilder_ != null || notificationConfig_ != null; + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + * + * @return The notificationConfig. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + getNotificationConfig() { + if (notificationConfigBuilder_ == null) { + return notificationConfig_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + .getDefaultInstance() + : notificationConfig_; + } else { + return notificationConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + */ + public Builder setNotificationConfig( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig value) { + if (notificationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + notificationConfig_ = value; + onChanged(); + } else { + notificationConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + */ + public Builder setNotificationConfig( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder + builderForValue) { + if (notificationConfigBuilder_ == null) { + notificationConfig_ = builderForValue.build(); + onChanged(); + } else { + notificationConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + */ + public Builder mergeNotificationConfig( + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig value) { + if (notificationConfigBuilder_ == null) { + if (notificationConfig_ != null) { + notificationConfig_ = + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.newBuilder( + notificationConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + notificationConfig_ = value; + } + onChanged(); + } else { + notificationConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + */ + public Builder clearNotificationConfig() { + if (notificationConfigBuilder_ == null) { + notificationConfig_ = null; + onChanged(); + } else { + notificationConfig_ = null; + notificationConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder + getNotificationConfigBuilder() { + + onChanged(); + return getNotificationConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder + getNotificationConfigOrBuilder() { + if (notificationConfigBuilder_ != null) { + return notificationConfigBuilder_.getMessageOrBuilder(); + } else { + return notificationConfig_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig + .getDefaultInstance() + : notificationConfig_; + } + } + /** + * + * + *
+       * Notification configuration.
+       * 
+ * + * .google.storagetransfer.v1.NotificationConfig notification_config = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder> + getNotificationConfigFieldBuilder() { + if (notificationConfigBuilder_ == null) { + notificationConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfig.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.NotificationConfigOrBuilder>( + getNotificationConfig(), getParentForChildren(), isClean()); + notificationConfig_ = null; + } + return notificationConfigBuilder_; + } + + 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_; + /** + * + * + *
+       * Start time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+       * Start time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @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(); + } + } + /** + * + * + *
+       * Start time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + 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; + } + /** + * + * + *
+       * Start time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Start time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + 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; + } + /** + * + * + *
+       * Start time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Start time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Start time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : startTime_; + } + } + /** + * + * + *
+       * Start time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + 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_; + /** + * + * + *
+       * End time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+       * End time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5; + * + * @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(); + } + } + /** + * + * + *
+       * End time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + 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; + } + /** + * + * + *
+       * End time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * End time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + 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; + } + /** + * + * + *
+       * End time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * End time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * End time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+       * End time of this transfer execution.
+       * 
+ * + * .google.protobuf.Timestamp end_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private int status_ = 0; + /** + * + * + *
+       * Status of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferOperation.Status status = 6; + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + /** + * + * + *
+       * Status of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferOperation.Status status = 6; + * + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Status of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferOperation.Status status = 6; + * + * @return The status. + */ + @java.lang.Override + public com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Status + getStatus() { + @SuppressWarnings("deprecation") + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Status result = + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Status.valueOf( + status_); + return result == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Status + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Status of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferOperation.Status status = 6; + * + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus( + com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation.Status value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Status of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferOperation.Status status = 6; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + + private com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters counters_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters, + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferCountersOrBuilder> + countersBuilder_; + /** + * + * + *
+       * Information about the progress of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + * + * @return Whether the counters field is set. + */ + public boolean hasCounters() { + return countersBuilder_ != null || counters_ != null; + } + /** + * + * + *
+       * Information about the progress of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + * + * @return The counters. + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters getCounters() { + if (countersBuilder_ == null) { + return counters_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters + .getDefaultInstance() + : counters_; + } else { + return countersBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Information about the progress of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + */ + public Builder setCounters( + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters value) { + if (countersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + counters_ = value; + onChanged(); + } else { + countersBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Information about the progress of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + */ + public Builder setCounters( + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.Builder + builderForValue) { + if (countersBuilder_ == null) { + counters_ = builderForValue.build(); + onChanged(); + } else { + countersBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Information about the progress of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + */ + public Builder mergeCounters( + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters value) { + if (countersBuilder_ == null) { + if (counters_ != null) { + counters_ = + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.newBuilder( + counters_) + .mergeFrom(value) + .buildPartial(); + } else { + counters_ = value; + } + onChanged(); + } else { + countersBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Information about the progress of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + */ + public Builder clearCounters() { + if (countersBuilder_ == null) { + counters_ = null; + onChanged(); + } else { + counters_ = null; + countersBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Information about the progress of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.Builder + getCountersBuilder() { + + onChanged(); + return getCountersFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Information about the progress of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.TransferCountersOrBuilder + getCountersOrBuilder() { + if (countersBuilder_ != null) { + return countersBuilder_.getMessageOrBuilder(); + } else { + return counters_ == null + ? com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters + .getDefaultInstance() + : counters_; + } + } + /** + * + * + *
+       * Information about the progress of the transfer operation.
+       * 
+ * + * .google.storagetransfer.v1.TransferCounters counters = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters, + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferCountersOrBuilder> + getCountersFieldBuilder() { + if (countersBuilder_ == null) { + countersBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters, + com.google.storagetransfer.v1.proto.TransferTypes.TransferCounters.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.TransferCountersOrBuilder>( + getCounters(), getParentForChildren(), isClean()); + counters_ = null; + } + return countersBuilder_; + } + + private java.util.List + errorBreakdowns_ = java.util.Collections.emptyList(); + + private void ensureErrorBreakdownsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + errorBreakdowns_ = + new java.util.ArrayList< + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary>(errorBreakdowns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummaryOrBuilder> + errorBreakdownsBuilder_; + + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public java.util.List + getErrorBreakdownsList() { + if (errorBreakdownsBuilder_ == null) { + return java.util.Collections.unmodifiableList(errorBreakdowns_); + } else { + return errorBreakdownsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public int getErrorBreakdownsCount() { + if (errorBreakdownsBuilder_ == null) { + return errorBreakdowns_.size(); + } else { + return errorBreakdownsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary getErrorBreakdowns( + int index) { + if (errorBreakdownsBuilder_ == null) { + return errorBreakdowns_.get(index); + } else { + return errorBreakdownsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public Builder setErrorBreakdowns( + int index, com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary value) { + if (errorBreakdownsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorBreakdownsIsMutable(); + errorBreakdowns_.set(index, value); + onChanged(); + } else { + errorBreakdownsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public Builder setErrorBreakdowns( + int index, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.Builder builderForValue) { + if (errorBreakdownsBuilder_ == null) { + ensureErrorBreakdownsIsMutable(); + errorBreakdowns_.set(index, builderForValue.build()); + onChanged(); + } else { + errorBreakdownsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public Builder addErrorBreakdowns( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary value) { + if (errorBreakdownsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorBreakdownsIsMutable(); + errorBreakdowns_.add(value); + onChanged(); + } else { + errorBreakdownsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public Builder addErrorBreakdowns( + int index, com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary value) { + if (errorBreakdownsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorBreakdownsIsMutable(); + errorBreakdowns_.add(index, value); + onChanged(); + } else { + errorBreakdownsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public Builder addErrorBreakdowns( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.Builder builderForValue) { + if (errorBreakdownsBuilder_ == null) { + ensureErrorBreakdownsIsMutable(); + errorBreakdowns_.add(builderForValue.build()); + onChanged(); + } else { + errorBreakdownsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public Builder addErrorBreakdowns( + int index, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.Builder builderForValue) { + if (errorBreakdownsBuilder_ == null) { + ensureErrorBreakdownsIsMutable(); + errorBreakdowns_.add(index, builderForValue.build()); + onChanged(); + } else { + errorBreakdownsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public Builder addAllErrorBreakdowns( + java.lang.Iterable< + ? extends com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary> + values) { + if (errorBreakdownsBuilder_ == null) { + ensureErrorBreakdownsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errorBreakdowns_); + onChanged(); + } else { + errorBreakdownsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public Builder clearErrorBreakdowns() { + if (errorBreakdownsBuilder_ == null) { + errorBreakdowns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + errorBreakdownsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public Builder removeErrorBreakdowns(int index) { + if (errorBreakdownsBuilder_ == null) { + ensureErrorBreakdownsIsMutable(); + errorBreakdowns_.remove(index); + onChanged(); + } else { + errorBreakdownsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.Builder + getErrorBreakdownsBuilder(int index) { + return getErrorBreakdownsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummaryOrBuilder + getErrorBreakdownsOrBuilder(int index) { + if (errorBreakdownsBuilder_ == null) { + return errorBreakdowns_.get(index); + } else { + return errorBreakdownsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public java.util.List< + ? extends com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummaryOrBuilder> + getErrorBreakdownsOrBuilderList() { + if (errorBreakdownsBuilder_ != null) { + return errorBreakdownsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errorBreakdowns_); + } + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.Builder + addErrorBreakdownsBuilder() { + return getErrorBreakdownsFieldBuilder() + .addBuilder( + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary + .getDefaultInstance()); + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.Builder + addErrorBreakdownsBuilder(int index) { + return getErrorBreakdownsFieldBuilder() + .addBuilder( + index, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary + .getDefaultInstance()); + } + /** + * + * + *
+       * Summarizes errors encountered with sample error log entries.
+       * 
+ * + * repeated .google.storagetransfer.v1.ErrorSummary error_breakdowns = 8; + */ + public java.util.List + getErrorBreakdownsBuilderList() { + return getErrorBreakdownsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummaryOrBuilder> + getErrorBreakdownsFieldBuilder() { + if (errorBreakdownsBuilder_ == null) { + errorBreakdownsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummary.Builder, + com.google.storagetransfer.v1.proto.TransferTypes.ErrorSummaryOrBuilder>( + errorBreakdowns_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + errorBreakdowns_ = null; + } + return errorBreakdownsBuilder_; + } + + private java.lang.Object transferJobName_ = ""; + /** + * + * + *
+       * The name of the transfer job that triggers this transfer operation.
+       * 
+ * + * string transfer_job_name = 9; + * + * @return The transferJobName. + */ + public java.lang.String getTransferJobName() { + java.lang.Object ref = transferJobName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transferJobName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The name of the transfer job that triggers this transfer operation.
+       * 
+ * + * string transfer_job_name = 9; + * + * @return The bytes for transferJobName. + */ + public com.google.protobuf.ByteString getTransferJobNameBytes() { + java.lang.Object ref = transferJobName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transferJobName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The name of the transfer job that triggers this transfer operation.
+       * 
+ * + * string transfer_job_name = 9; + * + * @param value The transferJobName to set. + * @return This builder for chaining. + */ + public Builder setTransferJobName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + transferJobName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the transfer job that triggers this transfer operation.
+       * 
+ * + * string transfer_job_name = 9; + * + * @return This builder for chaining. + */ + public Builder clearTransferJobName() { + + transferJobName_ = getDefaultInstance().getTransferJobName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The name of the transfer job that triggers this transfer operation.
+       * 
+ * + * string transfer_job_name = 9; + * + * @param value The bytes for transferJobName to set. + * @return This builder for chaining. + */ + public Builder setTransferJobNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + transferJobName_ = 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.storagetransfer.v1.TransferOperation) + } + + // @@protoc_insertion_point(class_scope:google.storagetransfer.v1.TransferOperation) + private static final com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation(); + } + + public static com.google.storagetransfer.v1.proto.TransferTypes.TransferOperation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransferOperation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransferOperation(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.storagetransfer.v1.proto.TransferTypes.TransferOperation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_GoogleServiceAccount_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_GoogleServiceAccount_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_AwsAccessKey_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_AwsAccessKey_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_AzureCredentials_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_AzureCredentials_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_ObjectConditions_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_ObjectConditions_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_GcsData_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_GcsData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_AwsS3Data_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_AwsS3Data_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_AzureBlobStorageData_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_AzureBlobStorageData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_HttpData_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_HttpData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_TransferOptions_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_TransferOptions_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_TransferSpec_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_TransferSpec_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_Schedule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_Schedule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_TransferJob_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_TransferJob_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_ErrorLogEntry_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_ErrorLogEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_ErrorSummary_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_ErrorSummary_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_TransferCounters_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_TransferCounters_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_NotificationConfig_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_NotificationConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storagetransfer_v1_TransferOperation_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storagetransfer_v1_TransferOperation_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n.google/storagetransfer/v1/transfer_typ" + + "es.proto\022\031google.storagetransfer.v1\032\034goo" + + "gle/api/annotations.proto\032\037google/api/fi" + + "eld_behavior.proto\032\031google/protobuf/any." + + "proto\032\036google/protobuf/duration.proto\032\037g" + + "oogle/protobuf/timestamp.proto\032\025google/r" + + "pc/code.proto\032\026google/type/date.proto\032\033g" + + "oogle/type/timeofday.proto\"A\n\024GoogleServ" + + "iceAccount\022\025\n\raccount_email\030\001 \001(\t\022\022\n\nsub" + + "ject_id\030\002 \001(\t\"J\n\014AwsAccessKey\022\032\n\raccess_" + + "key_id\030\001 \001(\tB\003\340A\002\022\036\n\021secret_access_key\030\002" + + " \001(\tB\003\340A\002\"*\n\020AzureCredentials\022\026\n\tsas_tok" + + "en\030\002 \001(\tB\003\340A\002\"\323\002\n\020ObjectConditions\022K\n(mi" + + "n_time_elapsed_since_last_modification\030\001" + + " \001(\0132\031.google.protobuf.Duration\022K\n(max_t" + + "ime_elapsed_since_last_modification\030\002 \001(" + + "\0132\031.google.protobuf.Duration\022\030\n\020include_" + + "prefixes\030\003 \003(\t\022\030\n\020exclude_prefixes\030\004 \003(\t" + + "\0227\n\023last_modified_since\030\005 \001(\0132\032.google.p" + + "rotobuf.Timestamp\0228\n\024last_modified_befor" + + "e\030\006 \001(\0132\032.google.protobuf.Timestamp\"1\n\007G" + + "csData\022\030\n\013bucket_name\030\001 \001(\tB\003\340A\002\022\014\n\004path" + + "\030\003 \001(\t\"\220\001\n\tAwsS3Data\022\030\n\013bucket_name\030\001 \001(" + + "\tB\003\340A\002\022D\n\016aws_access_key\030\002 \001(\0132\'.google." + + "storagetransfer.v1.AwsAccessKeyB\003\340A\004\022\014\n\004" + + "path\030\003 \001(\t\022\025\n\010role_arn\030\004 \001(\tB\003\340A\004\"\252\001\n\024Az" + + "ureBlobStorageData\022\034\n\017storage_account\030\001 " + + "\001(\tB\003\340A\002\022N\n\021azure_credentials\030\002 \001(\0132+.go" + + "ogle.storagetransfer.v1.AzureCredentials" + + "B\006\340A\002\340A\004\022\026\n\tcontainer\030\004 \001(\tB\003\340A\002\022\014\n\004path" + + "\030\005 \001(\t\"!\n\010HttpData\022\025\n\010list_url\030\001 \001(\tB\003\340A" + + "\002\"\237\001\n\017TransferOptions\0222\n*overwrite_objec" + + "ts_already_existing_in_sink\030\001 \001(\010\022%\n\035del" + + "ete_objects_unique_in_sink\030\002 \001(\010\0221\n)dele" + + "te_objects_from_source_after_transfer\030\003 " + + "\001(\010\"\224\004\n\014TransferSpec\022;\n\rgcs_data_sink\030\004 " + + "\001(\0132\".google.storagetransfer.v1.GcsDataH" + + "\000\022=\n\017gcs_data_source\030\001 \001(\0132\".google.stor" + + "agetransfer.v1.GcsDataH\001\022B\n\022aws_s3_data_" + + "source\030\002 \001(\0132$.google.storagetransfer.v1" + + ".AwsS3DataH\001\022?\n\020http_data_source\030\003 \001(\0132#" + + ".google.storagetransfer.v1.HttpDataH\001\022Y\n" + + "\036azure_blob_storage_data_source\030\010 \001(\0132/." + + "google.storagetransfer.v1.AzureBlobStora" + + "geDataH\001\022F\n\021object_conditions\030\005 \001(\0132+.go" + + "ogle.storagetransfer.v1.ObjectConditions" + + "\022D\n\020transfer_options\030\006 \001(\0132*.google.stor" + + "agetransfer.v1.TransferOptionsB\013\n\tdata_s" + + "inkB\r\n\013data_source\"\205\002\n\010Schedule\0223\n\023sched" + + "ule_start_date\030\001 \001(\0132\021.google.type.DateB" + + "\003\340A\002\022,\n\021schedule_end_date\030\002 \001(\0132\021.google" + + ".type.Date\0221\n\021start_time_of_day\030\003 \001(\0132\026." + + "google.type.TimeOfDay\022/\n\017end_time_of_day" + + "\030\004 \001(\0132\026.google.type.TimeOfDay\0222\n\017repeat" + + "_interval\030\005 \001(\0132\031.google.protobuf.Durati" + + "on\"\340\004\n\013TransferJob\022\014\n\004name\030\001 \001(\t\022\023\n\013desc" + + "ription\030\002 \001(\t\022\022\n\nproject_id\030\003 \001(\t\022>\n\rtra" + + "nsfer_spec\030\004 \001(\0132\'.google.storagetransfe" + + "r.v1.TransferSpec\022J\n\023notification_config" + + "\030\013 \001(\0132-.google.storagetransfer.v1.Notif" + + "icationConfig\0225\n\010schedule\030\005 \001(\0132#.google" + + ".storagetransfer.v1.Schedule\022=\n\006status\030\006" + + " \001(\0162-.google.storagetransfer.v1.Transfe" + + "rJob.Status\0226\n\rcreation_time\030\007 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\022?\n\026last_modi" + + "fication_time\030\010 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\0226\n\rdeletion_time\030\t \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\022\035\n\025latest_o" + + "peration_name\030\014 \001(\t\"H\n\006Status\022\026\n\022STATUS_" + + "UNSPECIFIED\020\000\022\013\n\007ENABLED\020\001\022\014\n\010DISABLED\020\002" + + "\022\013\n\007DELETED\020\003\"8\n\rErrorLogEntry\022\020\n\003url\030\001 " + + "\001(\tB\003\340A\002\022\025\n\rerror_details\030\003 \003(\t\"\230\001\n\014Erro" + + "rSummary\022)\n\nerror_code\030\001 \001(\0162\020.google.rp" + + "c.CodeB\003\340A\002\022\030\n\013error_count\030\002 \001(\003B\003\340A\002\022C\n" + + "\021error_log_entries\030\003 \003(\0132(.google.storag" + + "etransfer.v1.ErrorLogEntry\"\336\004\n\020TransferC" + + "ounters\022!\n\031objects_found_from_source\030\001 \001" + + "(\003\022\037\n\027bytes_found_from_source\030\002 \001(\003\022$\n\034o" + + "bjects_found_only_from_sink\030\003 \001(\003\022\"\n\032byt" + + "es_found_only_from_sink\030\004 \001(\003\022+\n#objects" + + "_from_source_skipped_by_sync\030\005 \001(\003\022)\n!by" + + "tes_from_source_skipped_by_sync\030\006 \001(\003\022\036\n" + + "\026objects_copied_to_sink\030\007 \001(\003\022\034\n\024bytes_c" + + "opied_to_sink\030\010 \001(\003\022#\n\033objects_deleted_f" + + "rom_source\030\t \001(\003\022!\n\031bytes_deleted_from_s" + + "ource\030\n \001(\003\022!\n\031objects_deleted_from_sink" + + "\030\013 \001(\003\022\037\n\027bytes_deleted_from_sink\030\014 \001(\003\022" + + "\"\n\032objects_from_source_failed\030\r \001(\003\022 \n\030b" + + "ytes_from_source_failed\030\016 \001(\003\022*\n\"objects" + + "_failed_to_delete_from_sink\030\017 \001(\003\022(\n byt" + + "es_failed_to_delete_from_sink\030\020 \001(\003\"\245\003\n\022" + + "NotificationConfig\022\031\n\014pubsub_topic\030\001 \001(\t" + + "B\003\340A\002\022L\n\013event_types\030\002 \003(\01627.google.stor" + + "agetransfer.v1.NotificationConfig.EventT" + + "ype\022X\n\016payload_format\030\003 \001(\0162;.google.sto" + + "ragetransfer.v1.NotificationConfig.Paylo" + + "adFormatB\003\340A\002\"\206\001\n\tEventType\022\032\n\026EVENT_TYP" + + "E_UNSPECIFIED\020\000\022\036\n\032TRANSFER_OPERATION_SU" + + "CCESS\020\001\022\035\n\031TRANSFER_OPERATION_FAILED\020\002\022\036" + + "\n\032TRANSFER_OPERATION_ABORTED\020\003\"C\n\rPayloa" + + "dFormat\022\036\n\032PAYLOAD_FORMAT_UNSPECIFIED\020\000\022" + + "\010\n\004NONE\020\001\022\010\n\004JSON\020\002\"\362\004\n\021TransferOperatio" + + "n\022\014\n\004name\030\001 \001(\t\022\022\n\nproject_id\030\002 \001(\t\022>\n\rt" + + "ransfer_spec\030\003 \001(\0132\'.google.storagetrans" + + "fer.v1.TransferSpec\022J\n\023notification_conf" + + "ig\030\n \001(\0132-.google.storagetransfer.v1.Not" + + "ificationConfig\022.\n\nstart_time\030\004 \001(\0132\032.go" + + "ogle.protobuf.Timestamp\022,\n\010end_time\030\005 \001(" + + "\0132\032.google.protobuf.Timestamp\022C\n\006status\030" + + "\006 \001(\01623.google.storagetransfer.v1.Transf" + + "erOperation.Status\022=\n\010counters\030\007 \001(\0132+.g" + + "oogle.storagetransfer.v1.TransferCounter" + + "s\022A\n\020error_breakdowns\030\010 \003(\0132\'.google.sto" + + "ragetransfer.v1.ErrorSummary\022\031\n\021transfer" + + "_job_name\030\t \001(\t\"o\n\006Status\022\026\n\022STATUS_UNSP" + + "ECIFIED\020\000\022\017\n\013IN_PROGRESS\020\001\022\n\n\006PAUSED\020\002\022\013" + + "\n\007SUCCESS\020\003\022\n\n\006FAILED\020\004\022\013\n\007ABORTED\020\005\022\n\n\006" + + "QUEUED\020\006B\352\001\n#com.google.storagetransfer." + + "v1.protoB\rTransferTypesZHgoogle.golang.o" + + "rg/genproto/googleapis/storagetransfer/v" + + "1;storagetransfer\370\001\001\252\002\037Google.Cloud.Stor" + + "ageTransfer.V1\312\002\037Google\\Cloud\\StorageTra" + + "nsfer\\V1\352\002\"Google::Cloud::StorageTransfe" + + "r::V1b\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.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.CodeProto.getDescriptor(), + com.google.type.DateProto.getDescriptor(), + com.google.type.TimeOfDayProto.getDescriptor(), + }); + internal_static_google_storagetransfer_v1_GoogleServiceAccount_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_storagetransfer_v1_GoogleServiceAccount_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_GoogleServiceAccount_descriptor, + new java.lang.String[] { + "AccountEmail", "SubjectId", + }); + internal_static_google_storagetransfer_v1_AwsAccessKey_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_storagetransfer_v1_AwsAccessKey_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_AwsAccessKey_descriptor, + new java.lang.String[] { + "AccessKeyId", "SecretAccessKey", + }); + internal_static_google_storagetransfer_v1_AzureCredentials_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_storagetransfer_v1_AzureCredentials_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_AzureCredentials_descriptor, + new java.lang.String[] { + "SasToken", + }); + internal_static_google_storagetransfer_v1_ObjectConditions_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_storagetransfer_v1_ObjectConditions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_ObjectConditions_descriptor, + new java.lang.String[] { + "MinTimeElapsedSinceLastModification", + "MaxTimeElapsedSinceLastModification", + "IncludePrefixes", + "ExcludePrefixes", + "LastModifiedSince", + "LastModifiedBefore", + }); + internal_static_google_storagetransfer_v1_GcsData_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_storagetransfer_v1_GcsData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_GcsData_descriptor, + new java.lang.String[] { + "BucketName", "Path", + }); + internal_static_google_storagetransfer_v1_AwsS3Data_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_storagetransfer_v1_AwsS3Data_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_AwsS3Data_descriptor, + new java.lang.String[] { + "BucketName", "AwsAccessKey", "Path", "RoleArn", + }); + internal_static_google_storagetransfer_v1_AzureBlobStorageData_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_storagetransfer_v1_AzureBlobStorageData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_AzureBlobStorageData_descriptor, + new java.lang.String[] { + "StorageAccount", "AzureCredentials", "Container", "Path", + }); + internal_static_google_storagetransfer_v1_HttpData_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_storagetransfer_v1_HttpData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_HttpData_descriptor, + new java.lang.String[] { + "ListUrl", + }); + internal_static_google_storagetransfer_v1_TransferOptions_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_storagetransfer_v1_TransferOptions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_TransferOptions_descriptor, + new java.lang.String[] { + "OverwriteObjectsAlreadyExistingInSink", + "DeleteObjectsUniqueInSink", + "DeleteObjectsFromSourceAfterTransfer", + }); + internal_static_google_storagetransfer_v1_TransferSpec_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_storagetransfer_v1_TransferSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_TransferSpec_descriptor, + new java.lang.String[] { + "GcsDataSink", + "GcsDataSource", + "AwsS3DataSource", + "HttpDataSource", + "AzureBlobStorageDataSource", + "ObjectConditions", + "TransferOptions", + "DataSink", + "DataSource", + }); + internal_static_google_storagetransfer_v1_Schedule_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_storagetransfer_v1_Schedule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_Schedule_descriptor, + new java.lang.String[] { + "ScheduleStartDate", + "ScheduleEndDate", + "StartTimeOfDay", + "EndTimeOfDay", + "RepeatInterval", + }); + internal_static_google_storagetransfer_v1_TransferJob_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_storagetransfer_v1_TransferJob_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_TransferJob_descriptor, + new java.lang.String[] { + "Name", + "Description", + "ProjectId", + "TransferSpec", + "NotificationConfig", + "Schedule", + "Status", + "CreationTime", + "LastModificationTime", + "DeletionTime", + "LatestOperationName", + }); + internal_static_google_storagetransfer_v1_ErrorLogEntry_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_storagetransfer_v1_ErrorLogEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_ErrorLogEntry_descriptor, + new java.lang.String[] { + "Url", "ErrorDetails", + }); + internal_static_google_storagetransfer_v1_ErrorSummary_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_storagetransfer_v1_ErrorSummary_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_ErrorSummary_descriptor, + new java.lang.String[] { + "ErrorCode", "ErrorCount", "ErrorLogEntries", + }); + internal_static_google_storagetransfer_v1_TransferCounters_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_storagetransfer_v1_TransferCounters_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_TransferCounters_descriptor, + new java.lang.String[] { + "ObjectsFoundFromSource", + "BytesFoundFromSource", + "ObjectsFoundOnlyFromSink", + "BytesFoundOnlyFromSink", + "ObjectsFromSourceSkippedBySync", + "BytesFromSourceSkippedBySync", + "ObjectsCopiedToSink", + "BytesCopiedToSink", + "ObjectsDeletedFromSource", + "BytesDeletedFromSource", + "ObjectsDeletedFromSink", + "BytesDeletedFromSink", + "ObjectsFromSourceFailed", + "BytesFromSourceFailed", + "ObjectsFailedToDeleteFromSink", + "BytesFailedToDeleteFromSink", + }); + internal_static_google_storagetransfer_v1_NotificationConfig_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_storagetransfer_v1_NotificationConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_NotificationConfig_descriptor, + new java.lang.String[] { + "PubsubTopic", "EventTypes", "PayloadFormat", + }); + internal_static_google_storagetransfer_v1_TransferOperation_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_storagetransfer_v1_TransferOperation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storagetransfer_v1_TransferOperation_descriptor, + new java.lang.String[] { + "Name", + "ProjectId", + "TransferSpec", + "NotificationConfig", + "StartTime", + "EndTime", + "Status", + "Counters", + "ErrorBreakdowns", + "TransferJobName", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.CodeProto.getDescriptor(); + com.google.type.DateProto.getDescriptor(); + com.google.type.TimeOfDayProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-storage-transfer-v1/src/main/proto/google/storagetransfer/v1/transfer.proto b/proto-google-cloud-storage-transfer-v1/src/main/proto/google/storagetransfer/v1/transfer.proto new file mode 100644 index 0000000..d282628 --- /dev/null +++ b/proto-google-cloud-storage-transfer-v1/src/main/proto/google/storagetransfer/v1/transfer.proto @@ -0,0 +1,243 @@ +// 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.storagetransfer.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/storagetransfer/v1/transfer_types.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.StorageTransfer.V1"; +option go_package = "google.golang.org/genproto/googleapis/storagetransfer/v1;storagetransfer"; +option java_outer_classname = "TransferProto"; +option java_package = "com.google.storagetransfer.v1.proto"; +option php_namespace = "Google\\Cloud\\StorageTransfer\\V1"; +option ruby_package = "Google::Cloud::StorageTransfer::V1"; + +// Storage Transfer Service and its protos. +// Transfers data between between Google Cloud Storage buckets or from a data +// source external to Google to a Cloud Storage bucket. +service StorageTransferService { + option (google.api.default_host) = "storagetransfer.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Returns the Google service account that is used by Storage Transfer + // Service to access buckets in the project where transfers + // run or in other projects. Each Google service account is associated + // with one Google Cloud Platform Console project. Users + // should add this service account to the Google Cloud Storage bucket + // ACLs to grant access to Storage Transfer Service. This service + // account is created and owned by Storage Transfer Service and can + // only be used by Storage Transfer Service. + rpc GetGoogleServiceAccount(GetGoogleServiceAccountRequest) + returns (GoogleServiceAccount) { + option (google.api.http) = { + get: "/v1/googleServiceAccounts/{project_id}" + }; + } + + // Creates a transfer job that runs periodically. + rpc CreateTransferJob(CreateTransferJobRequest) returns (TransferJob) { + option (google.api.http) = { + post: "/v1/transferJobs" + body: "transfer_job" + }; + } + + // Updates a transfer job. Updating a job's transfer spec does not affect + // transfer operations that are running already. + // + // **Note:** The job's [status][google.storagetransfer.v1.TransferJob.status] + // field can be modified using this RPC (for example, to set a job's status to + // [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED], + // [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], or + // [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED]). + rpc UpdateTransferJob(UpdateTransferJobRequest) returns (TransferJob) { + option (google.api.http) = { + patch: "/v1/{job_name=transferJobs/**}" + body: "*" + }; + } + + // Gets a transfer job. + rpc GetTransferJob(GetTransferJobRequest) returns (TransferJob) { + option (google.api.http) = { + get: "/v1/{job_name=transferJobs/**}" + }; + } + + // Lists transfer jobs. + rpc ListTransferJobs(ListTransferJobsRequest) + returns (ListTransferJobsResponse) { + option (google.api.http) = { + get: "/v1/transferJobs" + }; + } + + // Pauses a transfer operation. + rpc PauseTransferOperation(PauseTransferOperationRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=transferOperations/**}:pause" + body: "*" + }; + } + + // Resumes a transfer operation that is paused. + rpc ResumeTransferOperation(ResumeTransferOperationRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/{name=transferOperations/**}:resume" + body: "*" + }; + } + + // Attempts to start a new TransferOperation for the current TransferJob. A + // TransferJob has a maximum of one active TransferOperation. If this method + // is called while a TransferOperation is active, an error wil be returned. + rpc RunTransferJob(RunTransferJobRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{job_name=transferJobs/**}:run" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "TransferOperation" + }; + } +} + +// Request passed to GetGoogleServiceAccount. +message GetGoogleServiceAccountRequest { + // Required. The ID of the Google Cloud Platform Console project that the + // Google service account is associated with. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request passed to CreateTransferJob. +message CreateTransferJobRequest { + // Required. The job to create. + TransferJob transfer_job = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request passed to UpdateTransferJob. +message UpdateTransferJobRequest { + // Required. The name of job to update. + string job_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID of the Google Cloud Platform Console project that owns the + // job. + string project_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The job to update. `transferJob` is expected to specify only + // four fields: + // [description][google.storagetransfer.v1.TransferJob.description], + // [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], + // [notification_config][google.storagetransfer.v1.TransferJob.notification_config], + // and [status][google.storagetransfer.v1.TransferJob.status]. An + // `UpdateTransferJobRequest` that specifies other fields are rejected with + // the error [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. Updating a + // job status to + // [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED] requires + // `storagetransfer.jobs.delete` permissions. + TransferJob transfer_job = 3 [(google.api.field_behavior) = REQUIRED]; + + // The field mask of the fields in `transferJob` that are to be updated in + // this request. Fields in `transferJob` that can be updated are: + // [description][google.storagetransfer.v1.TransferJob.description], + // [transfer_spec][google.storagetransfer.v1.TransferJob.transfer_spec], + // [notification_config][google.storagetransfer.v1.TransferJob.notification_config], + // and [status][google.storagetransfer.v1.TransferJob.status]. To update the + // `transfer_spec` of the job, a complete transfer specification must be + // provided. An incomplete specification missing any required fields is + // rejected with the error + // [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT]. + google.protobuf.FieldMask update_transfer_job_field_mask = 4; +} + +// Request passed to GetTransferJob. +message GetTransferJobRequest { + // Required. + // The job to get. + string job_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID of the Google Cloud Platform Console project that owns the + // job. + string project_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// `projectId`, `jobNames`, and `jobStatuses` are query parameters that can +// be specified when listing transfer jobs. +message ListTransferJobsRequest { + // Required. A list of query parameters specified as JSON text in the form of: + // `{"projectId":"my_project_id", + // "jobNames":["jobid1","jobid2",...], + // "jobStatuses":["status1","status2",...]}` + // + // Since `jobNames` and `jobStatuses` support multiple values, their values + // must be specified with array notation. `projectId` is required. + // `jobNames` and `jobStatuses` are optional. The valid values for + // `jobStatuses` are case-insensitive: + // [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED], + // [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and + // [DELETED][google.storagetransfer.v1.TransferJob.Status.DELETED]. + string filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list page size. The max allowed value is 256. + int32 page_size = 4; + + // The list page token. + string page_token = 5; +} + +// Response from ListTransferJobs. +message ListTransferJobsResponse { + // A list of transfer jobs. + repeated TransferJob transfer_jobs = 1; + + // The list next page token. + string next_page_token = 2; +} + +// Request passed to PauseTransferOperation. +message PauseTransferOperationRequest { + // Required. The name of the transfer operation. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request passed to ResumeTransferOperation. +message ResumeTransferOperationRequest { + // Required. The name of the transfer operation. + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request passed to RunTransferJob. +message RunTransferJobRequest { + // Required. The name of the transfer job. + string job_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID of the Google Cloud Platform Console project that owns the + // transfer job. + string project_id = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/proto-google-cloud-storage-transfer-v1/src/main/proto/google/storagetransfer/v1/transfer_types.proto b/proto-google-cloud-storage-transfer-v1/src/main/proto/google/storagetransfer/v1/transfer_types.proto new file mode 100644 index 0000000..6301c57 --- /dev/null +++ b/proto-google-cloud-storage-transfer-v1/src/main/proto/google/storagetransfer/v1/transfer_types.proto @@ -0,0 +1,760 @@ +// 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.storagetransfer.v1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/code.proto"; +import "google/type/date.proto"; +import "google/type/timeofday.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.StorageTransfer.V1"; +option go_package = "google.golang.org/genproto/googleapis/storagetransfer/v1;storagetransfer"; +option java_outer_classname = "TransferTypes"; +option java_package = "com.google.storagetransfer.v1.proto"; +option php_namespace = "Google\\Cloud\\StorageTransfer\\V1"; +option ruby_package = "Google::Cloud::StorageTransfer::V1"; + +// Google service account +message GoogleServiceAccount { + // Email address of the service account. + string account_email = 1; + + // Unique identifier for the service account. + string subject_id = 2; +} + +// AWS access key (see +// [AWS Security +// Credentials](https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)). +// +// For information on our data retention policy for user credentials, see +// [User credentials](/storage-transfer/docs/data-retention#user-credentials). +message AwsAccessKey { + // Required. AWS access key ID. + string access_key_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. AWS secret access key. This field is not returned in RPC + // responses. + string secret_access_key = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Azure credentials +// +// For information on our data retention policy for user credentials, see +// [User credentials](/storage-transfer/docs/data-retention#user-credentials). +message AzureCredentials { + // Required. Azure shared access signature (SAS). + // + // + // + // For more information about SAS, see + // [Grant limited access to Azure Storage resources using shared access + // signatures + // (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview). + string sas_token = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Conditions that determine which objects will be transferred. Applies only +// to Cloud Data Sources such as S3, Azure, and Cloud Storage. +// +// The "last modification time" refers to the time of the +// last change to the object's content or metadata — specifically, this is +// the `updated` property of Cloud Storage objects, the `LastModified` field +// of S3 objects, and the `Last-Modified` header of Azure blobs. +message ObjectConditions { + // If specified, only objects with a "last modification time" before + // `NOW` - `min_time_elapsed_since_last_modification` and objects that don't + // have a "last modification time" are transferred. + // + // For each [TransferOperation][google.storagetransfer.v1.TransferOperation] + // started by this [TransferJob][google.storagetransfer.v1.TransferJob], `NOW` + // refers to the [start_time] + // [google.storagetransfer.v1.TransferOperation.start_time] of the + // `TransferOperation`. + google.protobuf.Duration min_time_elapsed_since_last_modification = 1; + + // If specified, only objects with a "last modification time" on or after + // `NOW` - `max_time_elapsed_since_last_modification` and objects that don't + // have a "last modification time" are transferred. + // + // For each [TransferOperation][google.storagetransfer.v1.TransferOperation] + // started by this [TransferJob][google.storagetransfer.v1.TransferJob], + // `NOW` refers to the [start_time] + // [google.storagetransfer.v1.TransferOperation.start_time] of the + // `TransferOperation`. + google.protobuf.Duration max_time_elapsed_since_last_modification = 2; + + // If you specify `include_prefixes`, Storage Transfer Service uses the items + // in the `include_prefixes` array to determine which objects to include in a + // transfer. Objects must start with one of the matching `include_prefixes` + // for inclusion in the transfer. If [exclude_prefixes] + // [google.storagetransfer.v1.ObjectConditions.exclude_prefixes] is specified, + // objects must not start with any of the `exclude_prefixes` specified for + // inclusion in the transfer. + // + // The following are requirements of `include_prefixes`: + // + // * Each include-prefix can contain any sequence of Unicode characters, to + // a max length of 1024 bytes when UTF8-encoded, and must not contain + // Carriage Return or Line Feed characters. Wildcard matching and regular + // expression matching are not supported. + // + // * Each include-prefix must omit the leading slash. For example, to + // include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, + // specify the include-prefix as `logs/y=2015/requests.gz`. + // + // * None of the include-prefix values can be empty, if specified. + // + // * Each include-prefix must include a distinct portion of the object + // namespace. No include-prefix may be a prefix of another + // include-prefix. + // + // The max size of `include_prefixes` is 1000. + // + // For more information, see [Filtering objects from + // transfers](/storage-transfer/docs/filtering-objects-from-transfers). + repeated string include_prefixes = 3; + + // If you specify `exclude_prefixes`, Storage Transfer Service uses the items + // in the `exclude_prefixes` array to determine which objects to exclude from + // a transfer. Objects must not start with one of the matching + // `exclude_prefixes` for inclusion in a transfer. + // + // The following are requirements of `exclude_prefixes`: + // + // * Each exclude-prefix can contain any sequence of Unicode characters, to + // a max length of 1024 bytes when UTF8-encoded, and must not contain + // Carriage Return or Line Feed characters. Wildcard matching and regular + // expression matching are not supported. + // + // * Each exclude-prefix must omit the leading slash. For example, to + // exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, + // specify the exclude-prefix as `logs/y=2015/requests.gz`. + // + // * None of the exclude-prefix values can be empty, if specified. + // + // * Each exclude-prefix must exclude a distinct portion of the object + // namespace. No exclude-prefix may be a prefix of another + // exclude-prefix. + // + // * If [include_prefixes] + // [google.storagetransfer.v1.ObjectConditions.include_prefixes] is + // specified, then each exclude-prefix must start with the value of a path + // explicitly included by `include_prefixes`. + // + // The max size of `exclude_prefixes` is 1000. + // + // For more information, see [Filtering objects from + // transfers](/storage-transfer/docs/filtering-objects-from-transfers). + repeated string exclude_prefixes = 4; + + // If specified, only objects with a "last modification time" on or after + // this timestamp and objects that don't have a "last modification time" are + // transferred. + // + // The `last_modified_since` and `last_modified_before` fields can be used + // together for chunked data processing. For example, consider a script that + // processes each day's worth of data at a time. For that you'd set each + // of the fields as follows: + // + // * `last_modified_since` to the start of the day + // + // * `last_modified_before` to the end of the day + google.protobuf.Timestamp last_modified_since = 5; + + // If specified, only objects with a "last modification time" before this + // timestamp and objects that don't have a "last modification time" will be + // transferred. + google.protobuf.Timestamp last_modified_before = 6; +} + +// In a GcsData resource, an object's name is the Cloud Storage object's +// name and its "last modification time" refers to the object's `updated` +// property of Cloud Storage objects, which changes when the content or the +// metadata of the object is updated. +message GcsData { + // Required. Cloud Storage bucket name. Must meet + // [Bucket Name Requirements](/storage/docs/naming#requirements). + string bucket_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Root path to transfer objects. + // + // Must be an empty string or full path name that ends with a '/'. This field + // is treated as an object prefix. As such, it should generally not begin with + // a '/'. + // + // The root path value must meet + // [Object Name Requirements](/storage/docs/naming#objectnames). + string path = 3; +} + +// An AwsS3Data resource can be a data source, but not a data sink. +// In an AwsS3Data resource, an object's name is the S3 object's key name. +message AwsS3Data { + // Required. S3 Bucket name (see + // [Creating a + // bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)). + string bucket_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Input only. AWS access key used to sign the API requests to the AWS S3 + // bucket. Permissions on the bucket must be granted to the access ID of the + // AWS access key. This field is required. + // + // For information on our data retention policy for user credentials, see + // [User credentials](/storage-transfer/docs/data-retention#user-credentials). + AwsAccessKey aws_access_key = 2 [(google.api.field_behavior) = INPUT_ONLY]; + + // Root path to transfer objects. + // + // Must be an empty string or full path name that ends with a '/'. This field + // is treated as an object prefix. As such, it should generally not begin with + // a '/'. + string path = 3; + + // Input only. Role arn to support temporary credentials via + // AssumeRoleWithWebIdentity. + // + // When role arn is provided, transfer service will fetch temporary + // credentials for the session using AssumeRoleWithWebIdentity call for the + // provided role using the [GoogleServiceAccount] for this project. + string role_arn = 4 [(google.api.field_behavior) = INPUT_ONLY]; +} + +// An AzureBlobStorageData resource can be a data source, but not a data sink. +// An AzureBlobStorageData resource represents one Azure container. The storage +// account determines the [Azure +// endpoint](https://docs.microsoft.com/en-us/azure/storage/common/storage-create-storage-account#storage-account-endpoints). +// In an AzureBlobStorageData resource, a blobs's name is the [Azure Blob +// Storage blob's key +// name](https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#blob-names). +message AzureBlobStorageData { + // Required. The name of the Azure Storage account. + string storage_account = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Input only. Credentials used to authenticate API requests to + // Azure. + // + // For information on our data retention policy for user credentials, see + // [User credentials](/storage-transfer/docs/data-retention#user-credentials). + AzureCredentials azure_credentials = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = INPUT_ONLY + ]; + + // Required. The container to transfer from the Azure Storage account. + string container = 4 [(google.api.field_behavior) = REQUIRED]; + + // Root path to transfer objects. + // + // Must be an empty string or full path name that ends with a '/'. This field + // is treated as an object prefix. As such, it should generally not begin with + // a '/'. + string path = 5; +} + +// An HttpData resource specifies a list of objects on the web to be transferred +// over HTTP. The information of the objects to be transferred is contained in +// a file referenced by a URL. The first line in the file must be +// `"TsvHttpData-1.0"`, which specifies the format of the file. Subsequent +// lines specify the information of the list of objects, one object per list +// entry. Each entry has the following tab-delimited fields: +// +// * **HTTP URL** — The location of the object. +// +// * **Length** — The size of the object in bytes. +// +// * **MD5** — The base64-encoded MD5 hash of the object. +// +// For an example of a valid TSV file, see +// [Transferring data from +// URLs](https://cloud.google.com/storage-transfer/docs/create-url-list). +// +// When transferring data based on a URL list, keep the following in mind: +// +// * When an object located at `http(s)://hostname:port/` is +// transferred to a data sink, the name of the object at the data sink is +// `/`. +// +// * If the specified size of an object does not match the actual size of the +// object fetched, the object will not be transferred. +// +// * If the specified MD5 does not match the MD5 computed from the transferred +// bytes, the object transfer will fail. +// +// * Ensure that each URL you specify is publicly accessible. For +// example, in Cloud Storage you can +// [share an object publicly] +// (/storage/docs/cloud-console#_sharingdata) and get a link to it. +// +// * Storage Transfer Service obeys `robots.txt` rules and requires the source +// HTTP server to support `Range` requests and to return a `Content-Length` +// header in each response. +// +// * [ObjectConditions][google.storagetransfer.v1.ObjectConditions] have no +// effect when filtering objects to transfer. +message HttpData { + // Required. The URL that points to the file that stores the object list + // entries. This file must allow public access. Currently, only URLs with + // HTTP and HTTPS schemes are supported. + string list_url = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// TransferOptions define the actions to be performed on objects in a transfer. +message TransferOptions { + // When to overwrite objects that already exist in the sink. The default is + // that only objects that are different from the source are ovewritten. If + // true, all objects in the sink whose name matches an object in the source + // will be overwritten with the source object. + bool overwrite_objects_already_existing_in_sink = 1; + + // Whether objects that exist only in the sink should be deleted. + // + // **Note:** This option and [delete_objects_from_source_after_transfer] + // [google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer] + // are mutually exclusive. + bool delete_objects_unique_in_sink = 2; + + // Whether objects should be deleted from the source after they are + // transferred to the sink. + // + // **Note:** This option and [delete_objects_unique_in_sink] + // [google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] + // are mutually exclusive. + bool delete_objects_from_source_after_transfer = 3; +} + +// Configuration for running a transfer. +message TransferSpec { + // The write sink for the data. + oneof data_sink { + // A Cloud Storage data sink. + GcsData gcs_data_sink = 4; + } + + // The read source of the data. + oneof data_source { + // A Cloud Storage data source. + GcsData gcs_data_source = 1; + + // An AWS S3 data source. + AwsS3Data aws_s3_data_source = 2; + + // An HTTP URL data source. + HttpData http_data_source = 3; + + // An Azure Blob Storage data source. + AzureBlobStorageData azure_blob_storage_data_source = 8; + } + + // Only objects that satisfy these object conditions are included in the set + // of data source and data sink objects. Object conditions based on + // objects' "last modification time" do not exclude objects in a data sink. + ObjectConditions object_conditions = 5; + + // If the option + // [delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] + // is `true` and time-based object conditions such as 'last modification time' + // are specified, the request fails with an + // [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + TransferOptions transfer_options = 6; +} + +// Transfers can be scheduled to recur or to run just once. +message Schedule { + // Required. The start date of a transfer. Date boundaries are determined + // relative to UTC time. If `schedule_start_date` and + // [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] + // are in the past relative to the job's creation time, the transfer starts + // the day after you schedule the transfer request. + // + // **Note:** When starting jobs at or near midnight UTC it is possible that + // a job will start later than expected. For example, if you send an outbound + // request on June 1 one millisecond prior to midnight UTC and the Storage + // Transfer Service server receives the request on June 2, then it will create + // a TransferJob with `schedule_start_date` set to June 2 and a + // `start_time_of_day` set to midnight UTC. The first scheduled + // [TransferOperation][google.storagetransfer.v1.TransferOperation] will take + // place on June 3 at midnight UTC. + google.type.Date schedule_start_date = 1 + [(google.api.field_behavior) = REQUIRED]; + + // The last day a transfer runs. Date boundaries are determined relative to + // UTC time. A job will run once per 24 hours within the following guidelines: + // + // * If `schedule_end_date` and + // [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] + // are the same and in + // the future relative to UTC, the transfer is executed only one time. + // * If `schedule_end_date` is later than `schedule_start_date` and + // `schedule_end_date` is in the future relative to UTC, the job will + // run each day at + // [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day] + // through `schedule_end_date`. + google.type.Date schedule_end_date = 2; + + // The time in UTC that a transfer job is scheduled to run. Transfers may + // start later than this time. + // + // If `start_time_of_day` is not specified: + // + // * One-time transfers run immediately. + // * Recurring transfers run immediately, and each day at midnight UTC, + // through + // [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date]. + // + // If `start_time_of_day` is specified: + // + // * One-time transfers run at the specified time. + // * Recurring transfers run at the specified time each day, through + // `schedule_end_date`. + google.type.TimeOfDay start_time_of_day = 3; + + // The time in UTC that no further transfer operations are scheduled. Combined + // with + // [schedule_end_date][google.storagetransfer.v1.Schedule.schedule_end_date], + // `end_time_of_day` specifies the end date and time for starting new transfer + // operations. This field must be greater than or equal to the timestamp + // corresponding to the combintation of + // [schedule_start_date][google.storagetransfer.v1.Schedule.schedule_start_date] + // and + // [start_time_of_day][google.storagetransfer.v1.Schedule.start_time_of_day], + // and is subject to the following: + // + // * If `end_time_of_day` is not set and `schedule_end_date` is set, then + // a default value of `23:59:59` is used for `end_time_of_day`. + // + // * If `end_time_of_day` is set and `schedule_end_date` is not set, then + // [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] is returned. + google.type.TimeOfDay end_time_of_day = 4; + + // Interval between the start of each scheduled TransferOperation. If + // unspecified, the default value is 24 hours. This value may not be less than + // 1 hour. + google.protobuf.Duration repeat_interval = 5; +} + +// This resource represents the configuration of a transfer job that runs +// periodically. +message TransferJob { + // The status of the transfer job. + enum Status { + // Zero is an illegal value. + STATUS_UNSPECIFIED = 0; + + // New transfers will be performed based on the schedule. + ENABLED = 1; + + // New transfers will not be scheduled. + DISABLED = 2; + + // This is a soft delete state. After a transfer job is set to this + // state, the job and all the transfer executions are subject to + // garbage collection. Transfer jobs become eligible for garbage collection + // 30 days after their status is set to `DELETED`. + DELETED = 3; + } + + // A unique name (within the transfer project) assigned when the job is + // created. If this field is empty in a CreateTransferJobRequest, Storage + // Transfer Service will assign a unique name. Otherwise, the specified name + // is used as the unique name for this job. + // + // If the specified name is in use by a job, the creation request fails with + // an [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + // + // This name must start with `"transferJobs/"` prefix and end with a letter or + // a number, and should be no more than 128 characters. This name must not + // start with 'transferJobs/OPI'. 'transferJobs/OPI' is a reserved prefix. + // Example: + // `"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$"` + // + // Invalid job names will fail with an + // [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + string name = 1; + + // A description provided by the user for the job. Its max length is 1024 + // bytes when Unicode-encoded. + string description = 2; + + // The ID of the Google Cloud Platform Project that owns the job. + string project_id = 3; + + // Transfer specification. + TransferSpec transfer_spec = 4; + + // Notification configuration. + NotificationConfig notification_config = 11; + + // Specifies schedule for the transfer job. + // This is an optional field. When the field is not set, the job will never + // execute a transfer, unless you invoke RunTransferJob or update the job to + // have a non-empty schedule. + Schedule schedule = 5; + + // Status of the job. This value MUST be specified for + // `CreateTransferJobRequests`. + // + // **Note:** The effect of the new job status takes place during a subsequent + // job run. For example, if you change the job status from + // [ENABLED][google.storagetransfer.v1.TransferJob.Status.ENABLED] to + // [DISABLED][google.storagetransfer.v1.TransferJob.Status.DISABLED], and an + // operation spawned by the transfer is running, the status change would not + // affect the current operation. + Status status = 6; + + // Output only. The time that the transfer job was created. + google.protobuf.Timestamp creation_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time that the transfer job was last modified. + google.protobuf.Timestamp last_modification_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time that the transfer job was deleted. + google.protobuf.Timestamp deletion_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The name of the most recently started TransferOperation of this JobConfig. + // Present if a TransferOperation has been created for this JobConfig. + string latest_operation_name = 12; +} + +// An entry describing an error that has occurred. +message ErrorLogEntry { + // Required. A URL that refers to the target (a data source, a data sink, + // or an object) with which the error is associated. + string url = 1 [(google.api.field_behavior) = REQUIRED]; + + // A list of messages that carry the error details. + repeated string error_details = 3; +} + +// A summary of errors by error code, plus a count and sample error log +// entries. +message ErrorSummary { + // Required. + google.rpc.Code error_code = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Count of this type of error. + int64 error_count = 2 [(google.api.field_behavior) = REQUIRED]; + + // Error samples. + // + // At most 5 error log entries will be recorded for a given + // error code for a single transfer operation. + repeated ErrorLogEntry error_log_entries = 3; +} + +// A collection of counters that report the progress of a transfer operation. +message TransferCounters { + // Objects found in the data source that are scheduled to be transferred, + // excluding any that are filtered based on object conditions or skipped due + // to sync. + int64 objects_found_from_source = 1; + + // Bytes found in the data source that are scheduled to be transferred, + // excluding any that are filtered based on object conditions or skipped due + // to sync. + int64 bytes_found_from_source = 2; + + // Objects found only in the data sink that are scheduled to be deleted. + int64 objects_found_only_from_sink = 3; + + // Bytes found only in the data sink that are scheduled to be deleted. + int64 bytes_found_only_from_sink = 4; + + // Objects in the data source that are not transferred because they already + // exist in the data sink. + int64 objects_from_source_skipped_by_sync = 5; + + // Bytes in the data source that are not transferred because they already + // exist in the data sink. + int64 bytes_from_source_skipped_by_sync = 6; + + // Objects that are copied to the data sink. + int64 objects_copied_to_sink = 7; + + // Bytes that are copied to the data sink. + int64 bytes_copied_to_sink = 8; + + // Objects that are deleted from the data source. + int64 objects_deleted_from_source = 9; + + // Bytes that are deleted from the data source. + int64 bytes_deleted_from_source = 10; + + // Objects that are deleted from the data sink. + int64 objects_deleted_from_sink = 11; + + // Bytes that are deleted from the data sink. + int64 bytes_deleted_from_sink = 12; + + // Objects in the data source that failed to be transferred or that failed + // to be deleted after being transferred. + int64 objects_from_source_failed = 13; + + // Bytes in the data source that failed to be transferred or that failed to + // be deleted after being transferred. + int64 bytes_from_source_failed = 14; + + // Objects that failed to be deleted from the data sink. + int64 objects_failed_to_delete_from_sink = 15; + + // Bytes that failed to be deleted from the data sink. + int64 bytes_failed_to_delete_from_sink = 16; +} + +// Specification to configure notifications published to Cloud Pub/Sub. +// Notifications will be published to the customer-provided topic using the +// following `PubsubMessage.attributes`: +// +// * `"eventType"`: one of the +// [EventType][google.storagetransfer.v1.NotificationConfig.EventType] values +// * `"payloadFormat"`: one of the +// [PayloadFormat][google.storagetransfer.v1.NotificationConfig.PayloadFormat] +// values +// * `"projectId"`: the +// [project_id][google.storagetransfer.v1.TransferOperation.project_id] of the +// `TransferOperation` +// * `"transferJobName"`: the +// [transfer_job_name][google.storagetransfer.v1.TransferOperation.transfer_job_name] +// of the `TransferOperation` +// * `"transferOperationName"`: the +// [name][google.storagetransfer.v1.TransferOperation.name] of the +// `TransferOperation` +// +// The `PubsubMessage.data` will contain a +// [TransferOperation][google.storagetransfer.v1.TransferOperation] resource +// formatted according to the specified `PayloadFormat`. +message NotificationConfig { + // Enum for specifying event types for which notifications are to be + // published. + // + // Additional event types may be added in the future. Clients should either + // safely ignore unrecognized event types or explicitly specify which event + // types they are prepared to accept. + enum EventType { + // Illegal value, to avoid allowing a default. + EVENT_TYPE_UNSPECIFIED = 0; + + // `TransferOperation` completed with status + // [SUCCESS][google.storagetransfer.v1.TransferOperation.Status.SUCCESS]. + TRANSFER_OPERATION_SUCCESS = 1; + + // `TransferOperation` completed with status + // [FAILED][google.storagetransfer.v1.TransferOperation.Status.FAILED]. + TRANSFER_OPERATION_FAILED = 2; + + // `TransferOperation` completed with status + // [ABORTED][google.storagetransfer.v1.TransferOperation.Status.ABORTED]. + TRANSFER_OPERATION_ABORTED = 3; + } + + // Enum for specifying the format of a notification message's payload. + enum PayloadFormat { + // Illegal value, to avoid allowing a default. + PAYLOAD_FORMAT_UNSPECIFIED = 0; + + // No payload is included with the notification. + NONE = 1; + + // `TransferOperation` is [formatted as a JSON + // response](https://developers.google.com/protocol-buffers/docs/proto3#json), + // in application/json. + JSON = 2; + } + + // Required. The `Topic.name` of the Cloud Pub/Sub topic to which to publish + // notifications. Must be of the format: `projects/{project}/topics/{topic}`. + // Not matching this format will result in an + // [INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT] error. + string pubsub_topic = 1 [(google.api.field_behavior) = REQUIRED]; + + // Event types for which a notification is desired. If empty, send + // notifications for all event types. + repeated EventType event_types = 2; + + // Required. The desired format of the notification message payloads. + PayloadFormat payload_format = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A description of the execution of a transfer. +message TransferOperation { + // The status of a TransferOperation. + enum Status { + // Zero is an illegal value. + STATUS_UNSPECIFIED = 0; + + // In progress. + IN_PROGRESS = 1; + + // Paused. + PAUSED = 2; + + // Completed successfully. + SUCCESS = 3; + + // Terminated due to an unrecoverable failure. + FAILED = 4; + + // Aborted by the user. + ABORTED = 5; + + // Temporarily delayed by the system. No user action is required. + QUEUED = 6; + } + + // A globally unique ID assigned by the system. + string name = 1; + + // The ID of the Google Cloud Platform Project that owns the operation. + string project_id = 2; + + // Transfer specification. + TransferSpec transfer_spec = 3; + + // Notification configuration. + NotificationConfig notification_config = 10; + + // Start time of this transfer execution. + google.protobuf.Timestamp start_time = 4; + + // End time of this transfer execution. + google.protobuf.Timestamp end_time = 5; + + // Status of the transfer operation. + Status status = 6; + + // Information about the progress of the transfer operation. + TransferCounters counters = 7; + + // Summarizes errors encountered with sample error log entries. + repeated ErrorSummary error_breakdowns = 8; + + // The name of the transfer job that triggers this transfer operation. + string transfer_job_name = 9; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..cfe17e0 --- /dev/null +++ b/renovate.json @@ -0,0 +1,76 @@ +{ + "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-storage-transfer", + "^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, + "dependencyDashboard": true, + "dependencyDashboardLabels": [ + "type: process" + ] +} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 0000000..a276fba --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + storage-transfer-install-without-bom + jar + Google Storage Transfer Service Install Without Bom + https://github.com/googleapis/java-storage-transfer + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-storage-transfer + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/samples/pom.xml b/samples/pom.xml new file mode 100644 index 0000000..b7cf0fc --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-storage-transfer-samples + 0.0.1-SNAPSHOT + pom + Google Storage Transfer Service Samples Parent + https://github.com/googleapis/java-storage-transfer + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.18 + + + + 1.8 + 1.8 + UTF-8 + + + + install-without-bom + snapshot + snippets + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + + true + + + + + diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml new file mode 100644 index 0000000..79cd7c4 --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + storage-transfer-snapshot + jar + Google Storage Transfer Service Snapshot Samples + https://github.com/googleapis/java-storage-transfer + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-storage-transfer + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + \ No newline at end of file diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 0000000..053e3cf --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + storage-transfer-snippets + jar + Google Storage Transfer Service Snippets + https://github.com/googleapis/java-storage-transfer + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-storage-transfer + 0.0.0 + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + diff --git a/versions.txt b/versions.txt new file mode 100644 index 0000000..0388c6d --- /dev/null +++ b/versions.txt @@ -0,0 +1,6 @@ +# Format: +# module:released-version:current-version + +google-cloud-storage-transfer:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-storage-transfer-v1:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-storage-transfer-v1:0.0.0:0.0.1-SNAPSHOT