diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..907b6a32 --- /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-bigquerydatatransfer/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. bigquerydatatransfer version(s): + +#### Steps to reproduce + + 1. ? + 2. ? + +#### Code example + +```java +// example +``` + +#### Stack trace +``` +Any relevant stacktrace here. +``` + +#### External references such as API reference guides + +- ? + +#### Any additional information below + + +Following these steps guarantees the quickest resolution possible. + +Thanks! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..754e30c6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +**Is your feature request related to a problem? Please describe.** +What the problem is. Example: I'm always frustrated when [...] + +**Describe the solution you'd like** +What you want to happen. + +**Describe alternatives you've considered** +Any alternative solutions or features you've considered. + +**Additional context** +Any other context or screenshots about the feature request. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 00000000..99586903 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_request.md @@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..0bd0ee06 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1 @@ +Fixes # (it's a good idea to open an issue first for context and/or discussion) \ No newline at end of file diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 00000000..dce2c845 --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,2 @@ +releaseType: java-yoshi +bumpMinorPreMajor: true \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..53f53a3c --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.idea +*.iml +target/ +__pycache__ + diff --git a/.kokoro/build.bat b/.kokoro/build.bat new file mode 100644 index 00000000..3233fe31 --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +1,3 @@ +:: See documentation in type-shell-output.bat + +"C:\Program Files\Git\bin\bash.exe" github/java-bigquerydatatransfer/.kokoro/build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 00000000..dc2936ef --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,66 @@ +#!/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}/.. + +# Print out Java version +java -version +echo ${JOB_TYPE} + +mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C + +# if GOOGLE_APPLICATION_CREDIENTIALS 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_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS}) +fi + +case ${JOB_TYPE} in +test) + mvn test -B -Dclirr.skip=true -Denforcer.skip=true + bash ${KOKORO_GFILE_DIR}/codecov.sh + bash .kokoro/coerce_logs.sh + ;; +lint) + mvn com.coveo:fmt-maven-plugin:check + ;; +javadoc) + mvn javadoc:javadoc javadoc:test-javadoc + ;; +integration) + mvn -B ${INTEGRATION_TEST_ARGS} \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + bash .kokoro/coerce_logs.sh + ;; +clirr) + mvn -B -Denforcer.skip=true clirr:check + ;; +*) + ;; +esac diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh new file mode 100755 index 00000000..5cf7ba49 --- /dev/null +++ b/.kokoro/coerce_logs.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script finds and moves sponge logs so that they can be found by placer +# and are not flagged as flaky by sponge. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +job=$(basename ${KOKORO_JOB_NAME}) + +echo "coercing sponge logs..." +for xml in `find . -name *-sponge_log.xml` +do + echo "processing ${xml}" + class=$(basename ${xml} | cut -d- -f2) + dir=$(dirname ${xml})/${job}/${class} + text=$(dirname ${xml})/${class}-sponge_log.txt + mkdir -p ${dir} + mv ${xml} ${dir}/sponge_log.xml + mv ${text} ${dir}/sponge_log.txt +done diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg new file mode 100644 index 00000000..a641c14d --- /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-bigquerydatatransfer/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-bigquerydatatransfer/.kokoro/build.sh" +} diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg new file mode 100644 index 00000000..b6c0509b --- /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-bigquerydatatransfer/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-bigquerydatatransfer/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/continuous/dependencies.cfg b/.kokoro/continuous/dependencies.cfg new file mode 100644 index 00000000..cd753bc2 --- /dev/null +++ b/.kokoro/continuous/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-bigquerydatatransfer/.kokoro/dependencies.sh" +} diff --git a/.kokoro/continuous/integration.cfg b/.kokoro/continuous/integration.cfg new file mode 100644 index 00000000..3b017fc8 --- /dev/null +++ b/.kokoro/continuous/integration.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/java8" +} diff --git a/.kokoro/continuous/java11.cfg b/.kokoro/continuous/java11.cfg new file mode 100644 index 00000000..709f2b4c --- /dev/null +++ b/.kokoro/continuous/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/continuous/java7.cfg b/.kokoro/continuous/java7.cfg new file mode 100644 index 00000000..cb24f44e --- /dev/null +++ b/.kokoro/continuous/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/continuous/java8-osx.cfg b/.kokoro/continuous/java8-osx.cfg new file mode 100644 index 00000000..d3a9f72d --- /dev/null +++ b/.kokoro/continuous/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-bigquerydatatransfer/.kokoro/build.sh" diff --git a/.kokoro/continuous/java8-win.cfg b/.kokoro/continuous/java8-win.cfg new file mode 100644 index 00000000..5bdcb1a9 --- /dev/null +++ b/.kokoro/continuous/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-bigquerydatatransfer/.kokoro/build.bat" diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg new file mode 100644 index 00000000..3b017fc8 --- /dev/null +++ b/.kokoro/continuous/java8.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/java8" +} diff --git a/.kokoro/continuous/lint.cfg b/.kokoro/continuous/lint.cfg new file mode 100644 index 00000000..6d323c8a --- /dev/null +++ b/.kokoro/continuous/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/continuous/propose_release.cfg b/.kokoro/continuous/propose_release.cfg new file mode 100644 index 00000000..19202bc2 --- /dev/null +++ b/.kokoro/continuous/propose_release.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-bigquerydatatransfer/.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-bigquerydatatransfer/.kokoro/continuous/propose_release.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/continuous/propose_release.sh b/.kokoro/continuous/propose_release.sh new file mode 100755 index 00000000..c305c709 --- /dev/null +++ b/.kokoro/continuous/propose_release.sh @@ -0,0 +1,29 @@ +#!/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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 + +export NPM_CONFIG_PREFIX=/home/node/.npm-global + +if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then + # Groom the release PR as new commits are merged. + npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ + --repo-url=googleapis/java-bigquerydatatransfer \ + --package-name="bigquerydatatransfer" \ + --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ + --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \ + --release-type=java-yoshi +fi diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh new file mode 100755 index 00000000..cc96e0ec --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,31 @@ +#!/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 + +cd github/java-bigquerydatatransfer/ + +# Print out Java +java -version +echo $JOB_TYPE + +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" + +# this should run maven enforcer +mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true + +mvn -B dependency:analyze -DfailOnWarning=true diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh new file mode 100755 index 00000000..73b3f56b --- /dev/null +++ b/.kokoro/linkage-monitor.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 +# Display commands being run. +set -x + +cd github/java-bigquerydatatransfer/ + +# Print out Java version +java -version +echo ${JOB_TYPE} + +mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V + +# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR +JAR=linkage-monitor-latest-all-deps.jar +curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" + +# Fails if there's new linkage errors compared with baseline +java -jar ${JAR} com.google.cloud:libraries-bom diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg new file mode 100644 index 00000000..b6c0509b --- /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-bigquerydatatransfer/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-bigquerydatatransfer/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/nightly/dependencies.cfg b/.kokoro/nightly/dependencies.cfg new file mode 100644 index 00000000..cd753bc2 --- /dev/null +++ b/.kokoro/nightly/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-bigquerydatatransfer/.kokoro/dependencies.sh" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg new file mode 100644 index 00000000..3b017fc8 --- /dev/null +++ b/.kokoro/nightly/integration.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/java8" +} diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg new file mode 100644 index 00000000..709f2b4c --- /dev/null +++ b/.kokoro/nightly/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg new file mode 100644 index 00000000..cb24f44e --- /dev/null +++ b/.kokoro/nightly/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg new file mode 100644 index 00000000..d3a9f72d --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-bigquerydatatransfer/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 00000000..5bdcb1a9 --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-bigquerydatatransfer/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg new file mode 100644 index 00000000..3b017fc8 --- /dev/null +++ b/.kokoro/nightly/java8.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/java8" +} diff --git a/.kokoro/nightly/lint.cfg b/.kokoro/nightly/lint.cfg new file mode 100644 index 00000000..6d323c8a --- /dev/null +++ b/.kokoro/nightly/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/clirr.cfg b/.kokoro/presubmit/clirr.cfg new file mode 100644 index 00000000..ec572442 --- /dev/null +++ b/.kokoro/presubmit/clirr.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "clirr" +} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg new file mode 100644 index 00000000..db3b329e --- /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-bigquerydatatransfer/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-bigquerydatatransfer/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg new file mode 100644 index 00000000..cd753bc2 --- /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-bigquerydatatransfer/.kokoro/dependencies.sh" +} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg new file mode 100644 index 00000000..141f90c1 --- /dev/null +++ b/.kokoro/presubmit/integration.cfg @@ -0,0 +1,31 @@ +# 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" +} + +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "keystore/73713_java_it_service_account" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "java_it_service_account" + } + } +} diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg new file mode 100644 index 00000000..709f2b4c --- /dev/null +++ b/.kokoro/presubmit/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg new file mode 100644 index 00000000..cb24f44e --- /dev/null +++ b/.kokoro/presubmit/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg new file mode 100644 index 00000000..d3a9f72d --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-bigquerydatatransfer/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 00000000..5bdcb1a9 --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-bigquerydatatransfer/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg new file mode 100644 index 00000000..3b017fc8 --- /dev/null +++ b/.kokoro/presubmit/java8.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/java8" +} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg new file mode 100644 index 00000000..cc8fac98 --- /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-bigquerydatatransfer/.kokoro/linkage-monitor.sh" +} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg new file mode 100644 index 00000000..6d323c8a --- /dev/null +++ b/.kokoro/presubmit/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg new file mode 100644 index 00000000..1b212d02 --- /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-bigquerydatatransfer/.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-bigquerydatatransfer/.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/bump_snapshot.sh b/.kokoro/release/bump_snapshot.sh new file mode 100755 index 00000000..a135e584 --- /dev/null +++ b/.kokoro/release/bump_snapshot.sh @@ -0,0 +1,30 @@ +#!/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 +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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 + +export NPM_CONFIG_PREFIX=/home/node/.npm-global + +if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then + # Groom the snapshot release PR immediately after publishing a release + npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \ + --repo-url=googleapis/java-bigquerydatatransfer \ + --package-name="bigquerydatatransfer" \ + --api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \ + --proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please \ + --snapshot \ + --release-type=java-auth-yoshi +fi diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg new file mode 100644 index 00000000..72a5f67e --- /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-bigquerydatatransfer/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-keyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-passphrase" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-pubkeyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "sonatype-credentials" + } + } +} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh new file mode 100755 index 00000000..6e3f6599 --- /dev/null +++ b/.kokoro/release/common.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# Get secrets from keystore and set and environment variables +setup_environment_secrets() { + export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) + export GPG_TTY=$(tty) + export GPG_HOMEDIR=/gpg + mkdir $GPG_HOMEDIR + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg + export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') + export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') +} + +create_settings_xml_file() { + echo " + + + ossrh + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-staging + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-snapshots + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + +" > $1 +} \ No newline at end of file diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg new file mode 100644 index 00000000..77a9b47f --- /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-bigquerydatatransfer/.kokoro/release/drop.sh" +} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh new file mode 100755 index 00000000..5c4551ef --- /dev/null +++ b/.kokoro/release/drop.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:drop -B \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg new file mode 100644 index 00000000..ded07ad6 --- /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-bigquerydatatransfer/.kokoro/release/promote.sh" +} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh new file mode 100755 index 00000000..1fa95fa5 --- /dev/null +++ b/.kokoro/release/promote.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh + +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg new file mode 100644 index 00000000..86b51ed0 --- /dev/null +++ b/.kokoro/release/publish_javadoc.cfg @@ -0,0 +1,19 @@ +# Format: //devtools/kokoro/config/proto/build.proto +env_vars: { + key: "STAGING_BUCKET" + value: "docs-staging" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-bigquerydatatransfer/.kokoro/release/publish_javadoc.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh new file mode 100755 index 00000000..bcc21d7e --- /dev/null +++ b/.kokoro/release/publish_javadoc.sh @@ -0,0 +1,55 @@ +#!/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 -DskipTests=true + +NAME=google-cloud-bigquerydatatransfer +VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# build the docs +mvn site -B + +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} + +popd diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg new file mode 100644 index 00000000..776a9360 --- /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-bigquerydatatransfer/.kokoro/release/snapshot.sh" +} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh new file mode 100755 index 00000000..098168a7 --- /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 install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg new file mode 100644 index 00000000..a670d0f1 --- /dev/null +++ b/.kokoro/release/stage.cfg @@ -0,0 +1,44 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-bigquerydatatransfer/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-bigquerydatatransfer/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-bigquerydatatransfer" + } +} + +# Fetch the token needed for reporting release status to GitHub +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} + +# Fetch magictoken to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "releasetool-magictoken" + } + } +} + +# Fetch api key to use with Magic Github Proxy +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "magic-github-proxy-api-key" + } + } +} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh new file mode 100755 index 00000000..3c482cbc --- /dev/null +++ b/.kokoro/release/stage.sh @@ -0,0 +1,42 @@ +#!/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 +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DskipTests=true \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} + +if [[ -n "${AUTORELEASE_PR}" ]] +then + mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml +fi \ No newline at end of file diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh new file mode 100644 index 00000000..ba17ce01 --- /dev/null +++ b/.kokoro/trampoline.sh @@ -0,0 +1,24 @@ +#!/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 +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/.repo-metadata.json b/.repo-metadata.json index a8f241a7..bf3e32e7 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -2,12 +2,12 @@ "name": "bigquerydatatransfer", "name_pretty": "Google BigQuery Data Transfer Service", "product_documentation": "https://cloud.google.com/bigquery/transfer/", - "client_documentation": "https://googleapis.dev/java/google-cloud-clients/latest/index.html?com/google/cloud/bigquery/datatransfer/v1/package-summary.html", + "client_documentation": "https://googleapis.dev/java/google-cloud-bigquerydatatransfer/latest", "issue_tracker": "https://issuetracker.google.com/savedsearches/559654", "release_level": "beta", "language": "java", - "repo": "googleapis/google-cloud-java", - "repo_short": "google-cloud-java", + "repo": "googleapis/java-bigquerydatatransfer", + "repo_short": "java-bigquerydatatransfer", "distribution_name": "com.google.cloud:google-cloud-bigquerydatatransfer", "api_id": "bigquerydatatransfer.googleapis.com" } \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..6b2238bb --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,93 @@ +# 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 *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the +Project Steward(s) for *[PROJECT NAME]*. 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 the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..ebbb59e5 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,28 @@ +# 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/). \ No newline at end of file diff --git a/LICENSE b/LICENSE index 4eedc011..d6456956 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,5 @@ -Apache License + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -178,7 +179,7 @@ Apache License 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 "{}" + 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 diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 00000000..5724ea94 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClient.java b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClient.java new file mode 100644 index 00000000..23f86fbd --- /dev/null +++ b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClient.java @@ -0,0 +1,1985 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigquery.datatransfer.v1; + +import com.google.api.core.ApiFunction; +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.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigquery.datatransfer.v1.stub.DataTransferServiceStub; +import com.google.cloud.bigquery.datatransfer.v1.stub.DataTransferServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: The Google BigQuery Data Transfer Service API enables BigQuery users to + * configure the transfer of their data from other Google Products into BigQuery. This service + * contains methods that are end user exposed. It backs up the frontend. + * + *

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: + * + *

+ * 
+ * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ *   DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]");
+ *   DataSource response = dataTransferServiceClient.getDataSource(name);
+ * }
+ * 
+ * 
+ * + *

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

To customize credentials: + * + *

+ * 
+ * DataTransferServiceSettings dataTransferServiceSettings =
+ *     DataTransferServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataTransferServiceClient dataTransferServiceClient =
+ *     DataTransferServiceClient.create(dataTransferServiceSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * DataTransferServiceSettings dataTransferServiceSettings =
+ *     DataTransferServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataTransferServiceClient dataTransferServiceClient =
+ *     DataTransferServiceClient.create(dataTransferServiceSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class DataTransferServiceClient implements BackgroundResource { + private final DataTransferServiceSettings settings; + private final DataTransferServiceStub stub; + + /** Constructs an instance of DataTransferServiceClient with default settings. */ + public static final DataTransferServiceClient create() throws IOException { + return create(DataTransferServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataTransferServiceClient, 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 DataTransferServiceClient create(DataTransferServiceSettings settings) + throws IOException { + return new DataTransferServiceClient(settings); + } + + /** + * Constructs an instance of DataTransferServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer to use DataTransferServiceSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final DataTransferServiceClient create(DataTransferServiceStub stub) { + return new DataTransferServiceClient(stub); + } + + /** + * Constructs an instance of DataTransferServiceClient, 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 DataTransferServiceClient(DataTransferServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataTransferServiceStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected DataTransferServiceClient(DataTransferServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final DataTransferServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataTransferServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves a supported data source and returns its settings, which can be used for UI rendering. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]");
+   *   DataSource response = dataTransferServiceClient.getDataSource(name);
+   * }
+   * 
+ * + * @param name Required. The field will contain name of the resource requested, for example: + * `projects/{project_id}/dataSources/{data_source_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSource getDataSource(DataSourceName name) { + + GetDataSourceRequest request = + GetDataSourceRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataSource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves a supported data source and returns its settings, which can be used for UI rendering. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]");
+   *   DataSource response = dataTransferServiceClient.getDataSource(name.toString());
+   * }
+   * 
+ * + * @param name Required. The field will contain name of the resource requested, for example: + * `projects/{project_id}/dataSources/{data_source_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataSource getDataSource(String name) { + + GetDataSourceRequest request = GetDataSourceRequest.newBuilder().setName(name).build(); + return getDataSource(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves a supported data source and returns its settings, which can be used for UI rendering. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]");
+   *   GetDataSourceRequest request = GetDataSourceRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   DataSource response = dataTransferServiceClient.getDataSource(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 DataSource getDataSource(GetDataSourceRequest request) { + return getDataSourceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Retrieves a supported data source and returns its settings, which can be used for UI rendering. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]");
+   *   GetDataSourceRequest request = GetDataSourceRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<DataSource> future = dataTransferServiceClient.getDataSourceCallable().futureCall(request);
+   *   // Do something
+   *   DataSource response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getDataSourceCallable() { + return stub.getDataSourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists supported data sources and returns their settings, which can be used for UI rendering. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   for (DataSource element : dataTransferServiceClient.listDataSources(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The BigQuery project id for which data sources should be returned. Must + * be in the form: `projects/{project_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataSourcesPagedResponse listDataSources(ParentName parent) { + ListDataSourcesRequest request = + ListDataSourcesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataSources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists supported data sources and returns their settings, which can be used for UI rendering. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   for (DataSource element : dataTransferServiceClient.listDataSources(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The BigQuery project id for which data sources should be returned. Must + * be in the form: `projects/{project_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataSourcesPagedResponse listDataSources(String parent) { + ListDataSourcesRequest request = ListDataSourcesRequest.newBuilder().setParent(parent).build(); + return listDataSources(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists supported data sources and returns their settings, which can be used for UI rendering. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ListDataSourcesRequest request = ListDataSourcesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (DataSource element : dataTransferServiceClient.listDataSources(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 ListDataSourcesPagedResponse listDataSources(ListDataSourcesRequest request) { + return listDataSourcesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists supported data sources and returns their settings, which can be used for UI rendering. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ListDataSourcesRequest request = ListDataSourcesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListDataSourcesPagedResponse> future = dataTransferServiceClient.listDataSourcesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (DataSource element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listDataSourcesPagedCallable() { + return stub.listDataSourcesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists supported data sources and returns their settings, which can be used for UI rendering. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ListDataSourcesRequest request = ListDataSourcesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListDataSourcesResponse response = dataTransferServiceClient.listDataSourcesCallable().call(request);
+   *     for (DataSource element : response.getDataSourcesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listDataSourcesCallable() { + return stub.listDataSourcesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new data transfer configuration. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   TransferConfig transferConfig = TransferConfig.newBuilder().build();
+   *   TransferConfig response = dataTransferServiceClient.createTransferConfig(parent, transferConfig);
+   * }
+   * 
+ * + * @param parent Required. The BigQuery project id where the transfer configuration should be + * created. Must be in the format projects/{project_id}/locations/{location_id} If specified + * location and location of the destination bigquery dataset do not match - the request will + * fail. + * @param transferConfig Required. Data transfer configuration to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransferConfig createTransferConfig( + ParentName parent, TransferConfig transferConfig) { + + CreateTransferConfigRequest request = + CreateTransferConfigRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTransferConfig(transferConfig) + .build(); + return createTransferConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new data transfer configuration. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   TransferConfig transferConfig = TransferConfig.newBuilder().build();
+   *   TransferConfig response = dataTransferServiceClient.createTransferConfig(parent.toString(), transferConfig);
+   * }
+   * 
+ * + * @param parent Required. The BigQuery project id where the transfer configuration should be + * created. Must be in the format projects/{project_id}/locations/{location_id} If specified + * location and location of the destination bigquery dataset do not match - the request will + * fail. + * @param transferConfig Required. Data transfer configuration to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransferConfig createTransferConfig(String parent, TransferConfig transferConfig) { + + CreateTransferConfigRequest request = + CreateTransferConfigRequest.newBuilder() + .setParent(parent) + .setTransferConfig(transferConfig) + .build(); + return createTransferConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new data transfer configuration. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   TransferConfig transferConfig = TransferConfig.newBuilder().build();
+   *   CreateTransferConfigRequest request = CreateTransferConfigRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setTransferConfig(transferConfig)
+   *     .build();
+   *   TransferConfig response = dataTransferServiceClient.createTransferConfig(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 TransferConfig createTransferConfig(CreateTransferConfigRequest request) { + return createTransferConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a new data transfer configuration. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   TransferConfig transferConfig = TransferConfig.newBuilder().build();
+   *   CreateTransferConfigRequest request = CreateTransferConfigRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setTransferConfig(transferConfig)
+   *     .build();
+   *   ApiFuture<TransferConfig> future = dataTransferServiceClient.createTransferConfigCallable().futureCall(request);
+   *   // Do something
+   *   TransferConfig response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + createTransferConfigCallable() { + return stub.createTransferConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a data transfer configuration. All fields must be set, even if they are not updated. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfig transferConfig = TransferConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   TransferConfig response = dataTransferServiceClient.updateTransferConfig(transferConfig, updateMask);
+   * }
+   * 
+ * + * @param transferConfig Required. Data transfer configuration to create. + * @param updateMask Required. Required list of fields to be updated in this request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransferConfig updateTransferConfig( + TransferConfig transferConfig, FieldMask updateMask) { + + UpdateTransferConfigRequest request = + UpdateTransferConfigRequest.newBuilder() + .setTransferConfig(transferConfig) + .setUpdateMask(updateMask) + .build(); + return updateTransferConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a data transfer configuration. All fields must be set, even if they are not updated. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfig transferConfig = TransferConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateTransferConfigRequest request = UpdateTransferConfigRequest.newBuilder()
+   *     .setTransferConfig(transferConfig)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   TransferConfig response = dataTransferServiceClient.updateTransferConfig(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 TransferConfig updateTransferConfig(UpdateTransferConfigRequest request) { + return updateTransferConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a data transfer configuration. All fields must be set, even if they are not updated. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfig transferConfig = TransferConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   UpdateTransferConfigRequest request = UpdateTransferConfigRequest.newBuilder()
+   *     .setTransferConfig(transferConfig)
+   *     .setUpdateMask(updateMask)
+   *     .build();
+   *   ApiFuture<TransferConfig> future = dataTransferServiceClient.updateTransferConfigCallable().futureCall(request);
+   *   // Do something
+   *   TransferConfig response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + updateTransferConfigCallable() { + return stub.updateTransferConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a data transfer configuration, including any associated transfer runs and logs. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   dataTransferServiceClient.deleteTransferConfig(name);
+   * }
+   * 
+ * + * @param name Required. The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTransferConfig(TransferConfigName name) { + + DeleteTransferConfigRequest request = + DeleteTransferConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteTransferConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a data transfer configuration, including any associated transfer runs and logs. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   dataTransferServiceClient.deleteTransferConfig(name.toString());
+   * }
+   * 
+ * + * @param name Required. The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTransferConfig(String name) { + + DeleteTransferConfigRequest request = + DeleteTransferConfigRequest.newBuilder().setName(name).build(); + deleteTransferConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a data transfer configuration, including any associated transfer runs and logs. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   DeleteTransferConfigRequest request = DeleteTransferConfigRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   dataTransferServiceClient.deleteTransferConfig(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 deleteTransferConfig(DeleteTransferConfigRequest request) { + deleteTransferConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a data transfer configuration, including any associated transfer runs and logs. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   DeleteTransferConfigRequest request = DeleteTransferConfigRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = dataTransferServiceClient.deleteTransferConfigCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteTransferConfigCallable() { + return stub.deleteTransferConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about a data transfer config. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   TransferConfig response = dataTransferServiceClient.getTransferConfig(name);
+   * }
+   * 
+ * + * @param name Required. The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransferConfig getTransferConfig(TransferConfigName name) { + + GetTransferConfigRequest request = + GetTransferConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getTransferConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about a data transfer config. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   TransferConfig response = dataTransferServiceClient.getTransferConfig(name.toString());
+   * }
+   * 
+ * + * @param name Required. The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransferConfig getTransferConfig(String name) { + + GetTransferConfigRequest request = GetTransferConfigRequest.newBuilder().setName(name).build(); + return getTransferConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about a data transfer config. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   GetTransferConfigRequest request = GetTransferConfigRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   TransferConfig response = dataTransferServiceClient.getTransferConfig(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 TransferConfig getTransferConfig(GetTransferConfigRequest request) { + return getTransferConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about a data transfer config. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   GetTransferConfigRequest request = GetTransferConfigRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<TransferConfig> future = dataTransferServiceClient.getTransferConfigCallable().futureCall(request);
+   *   // Do something
+   *   TransferConfig response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getTransferConfigCallable() { + return stub.getTransferConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about all data transfers in the project. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   for (TransferConfig element : dataTransferServiceClient.listTransferConfigs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The BigQuery project id for which data sources should be returned: + * `projects/{project_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTransferConfigsPagedResponse listTransferConfigs(ParentName parent) { + ListTransferConfigsRequest request = + ListTransferConfigsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTransferConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about all data transfers in the project. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   for (TransferConfig element : dataTransferServiceClient.listTransferConfigs(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. The BigQuery project id for which data sources should be returned: + * `projects/{project_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTransferConfigsPagedResponse listTransferConfigs(String parent) { + ListTransferConfigsRequest request = + ListTransferConfigsRequest.newBuilder().setParent(parent).build(); + return listTransferConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about all data transfers in the project. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ListTransferConfigsRequest request = ListTransferConfigsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (TransferConfig element : dataTransferServiceClient.listTransferConfigs(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 ListTransferConfigsPagedResponse listTransferConfigs( + ListTransferConfigsRequest request) { + return listTransferConfigsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about all data transfers in the project. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ListTransferConfigsRequest request = ListTransferConfigsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListTransferConfigsPagedResponse> future = dataTransferServiceClient.listTransferConfigsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (TransferConfig element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listTransferConfigsPagedCallable() { + return stub.listTransferConfigsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about all data transfers in the project. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   ParentName parent = ProjectName.of("[PROJECT]");
+   *   ListTransferConfigsRequest request = ListTransferConfigsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListTransferConfigsResponse response = dataTransferServiceClient.listTransferConfigsCallable().call(request);
+   *     for (TransferConfig element : response.getTransferConfigsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listTransferConfigsCallable() { + return stub.listTransferConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever + * granularity the data source supports - in the range, one transfer run is created. Note that + * runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns + * instead. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   Timestamp startTime = Timestamp.newBuilder().build();
+   *   Timestamp endTime = Timestamp.newBuilder().build();
+   *   ScheduleTransferRunsResponse response = dataTransferServiceClient.scheduleTransferRuns(parent, startTime, endTime);
+   * }
+   * 
+ * + * @param parent Required. Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}`. + * @param startTime Required. Start time of the range of transfer runs. For example, + * `"2017-05-25T00:00:00+00:00"`. + * @param endTime Required. End time of the range of transfer runs. For example, + * `"2017-05-30T00:00:00+00:00"`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ScheduleTransferRunsResponse scheduleTransferRuns( + TransferConfigName parent, Timestamp startTime, Timestamp endTime) { + + ScheduleTransferRunsRequest request = + ScheduleTransferRunsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setStartTime(startTime) + .setEndTime(endTime) + .build(); + return scheduleTransferRuns(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever + * granularity the data source supports - in the range, one transfer run is created. Note that + * runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns + * instead. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   Timestamp startTime = Timestamp.newBuilder().build();
+   *   Timestamp endTime = Timestamp.newBuilder().build();
+   *   ScheduleTransferRunsResponse response = dataTransferServiceClient.scheduleTransferRuns(parent.toString(), startTime, endTime);
+   * }
+   * 
+ * + * @param parent Required. Transfer configuration name in the form: + * `projects/{project_id}/transferConfigs/{config_id}`. + * @param startTime Required. Start time of the range of transfer runs. For example, + * `"2017-05-25T00:00:00+00:00"`. + * @param endTime Required. End time of the range of transfer runs. For example, + * `"2017-05-30T00:00:00+00:00"`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ScheduleTransferRunsResponse scheduleTransferRuns( + String parent, Timestamp startTime, Timestamp endTime) { + + ScheduleTransferRunsRequest request = + ScheduleTransferRunsRequest.newBuilder() + .setParent(parent) + .setStartTime(startTime) + .setEndTime(endTime) + .build(); + return scheduleTransferRuns(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever + * granularity the data source supports - in the range, one transfer run is created. Note that + * runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns + * instead. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   Timestamp startTime = Timestamp.newBuilder().build();
+   *   Timestamp endTime = Timestamp.newBuilder().build();
+   *   ScheduleTransferRunsRequest request = ScheduleTransferRunsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setStartTime(startTime)
+   *     .setEndTime(endTime)
+   *     .build();
+   *   ScheduleTransferRunsResponse response = dataTransferServiceClient.scheduleTransferRuns(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 ScheduleTransferRunsResponse scheduleTransferRuns( + ScheduleTransferRunsRequest request) { + return scheduleTransferRunsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates transfer runs for a time range [start_time, end_time]. For each date - or whatever + * granularity the data source supports - in the range, one transfer run is created. Note that + * runs are created per UTC time in the time range. DEPRECATED: use StartManualTransferRuns + * instead. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   Timestamp startTime = Timestamp.newBuilder().build();
+   *   Timestamp endTime = Timestamp.newBuilder().build();
+   *   ScheduleTransferRunsRequest request = ScheduleTransferRunsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setStartTime(startTime)
+   *     .setEndTime(endTime)
+   *     .build();
+   *   ApiFuture<ScheduleTransferRunsResponse> future = dataTransferServiceClient.scheduleTransferRunsCallable().futureCall(request);
+   *   // Do something
+   *   ScheduleTransferRunsResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + scheduleTransferRunsCallable() { + return stub.scheduleTransferRunsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about the particular transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName name = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   TransferRun response = dataTransferServiceClient.getTransferRun(name);
+   * }
+   * 
+ * + * @param name Required. The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransferRun getTransferRun(RunName name) { + + GetTransferRunRequest request = + GetTransferRunRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTransferRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about the particular transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName name = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   TransferRun response = dataTransferServiceClient.getTransferRun(name.toString());
+   * }
+   * 
+ * + * @param name Required. The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TransferRun getTransferRun(String name) { + + GetTransferRunRequest request = GetTransferRunRequest.newBuilder().setName(name).build(); + return getTransferRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about the particular transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName name = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   GetTransferRunRequest request = GetTransferRunRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   TransferRun response = dataTransferServiceClient.getTransferRun(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 TransferRun getTransferRun(GetTransferRunRequest request) { + return getTransferRunCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about the particular transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName name = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   GetTransferRunRequest request = GetTransferRunRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<TransferRun> future = dataTransferServiceClient.getTransferRunCallable().futureCall(request);
+   *   // Do something
+   *   TransferRun response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getTransferRunCallable() { + return stub.getTransferRunCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName name = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   dataTransferServiceClient.deleteTransferRun(name);
+   * }
+   * 
+ * + * @param name Required. The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTransferRun(RunName name) { + + DeleteTransferRunRequest request = + DeleteTransferRunRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteTransferRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName name = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   dataTransferServiceClient.deleteTransferRun(name.toString());
+   * }
+   * 
+ * + * @param name Required. The field will contain name of the resource requested, for example: + * `projects/{project_id}/transferConfigs/{config_id}/runs/{run_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTransferRun(String name) { + + DeleteTransferRunRequest request = DeleteTransferRunRequest.newBuilder().setName(name).build(); + deleteTransferRun(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName name = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   DeleteTransferRunRequest request = DeleteTransferRunRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   dataTransferServiceClient.deleteTransferRun(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 deleteTransferRun(DeleteTransferRunRequest request) { + deleteTransferRunCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes the specified transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName name = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   DeleteTransferRunRequest request = DeleteTransferRunRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = dataTransferServiceClient.deleteTransferRunCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteTransferRunCallable() { + return stub.deleteTransferRunCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about running and completed jobs. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   for (TransferRun element : dataTransferServiceClient.listTransferRuns(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Name of transfer configuration for which transfer runs should be + * retrieved. Format of transfer configuration resource name is: + * `projects/{project_id}/transferConfigs/{config_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTransferRunsPagedResponse listTransferRuns(TransferConfigName parent) { + ListTransferRunsRequest request = + ListTransferRunsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTransferRuns(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about running and completed jobs. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   for (TransferRun element : dataTransferServiceClient.listTransferRuns(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Name of transfer configuration for which transfer runs should be + * retrieved. Format of transfer configuration resource name is: + * `projects/{project_id}/transferConfigs/{config_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTransferRunsPagedResponse listTransferRuns(String parent) { + ListTransferRunsRequest request = + ListTransferRunsRequest.newBuilder().setParent(parent).build(); + return listTransferRuns(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about running and completed jobs. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   ListTransferRunsRequest request = ListTransferRunsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (TransferRun element : dataTransferServiceClient.listTransferRuns(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 ListTransferRunsPagedResponse listTransferRuns(ListTransferRunsRequest request) { + return listTransferRunsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about running and completed jobs. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   ListTransferRunsRequest request = ListTransferRunsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListTransferRunsPagedResponse> future = dataTransferServiceClient.listTransferRunsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (TransferRun element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listTransferRunsPagedCallable() { + return stub.listTransferRunsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns information about running and completed jobs. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]");
+   *   ListTransferRunsRequest request = ListTransferRunsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListTransferRunsResponse response = dataTransferServiceClient.listTransferRunsCallable().call(request);
+   *     for (TransferRun element : response.getTransferRunsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listTransferRunsCallable() { + return stub.listTransferRunsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns user facing log messages for the data transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName parent = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   for (TransferMessage element : dataTransferServiceClient.listTransferLogs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Transfer run name in the form: + * `projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTransferLogsPagedResponse listTransferLogs(RunName parent) { + ListTransferLogsRequest request = + ListTransferLogsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTransferLogs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns user facing log messages for the data transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName parent = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   for (TransferMessage element : dataTransferServiceClient.listTransferLogs(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. Transfer run name in the form: + * `projects/{project_id}/transferConfigs/{config_Id}/runs/{run_id}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTransferLogsPagedResponse listTransferLogs(String parent) { + ListTransferLogsRequest request = + ListTransferLogsRequest.newBuilder().setParent(parent).build(); + return listTransferLogs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns user facing log messages for the data transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName parent = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   ListTransferLogsRequest request = ListTransferLogsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (TransferMessage element : dataTransferServiceClient.listTransferLogs(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 ListTransferLogsPagedResponse listTransferLogs(ListTransferLogsRequest request) { + return listTransferLogsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns user facing log messages for the data transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName parent = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   ListTransferLogsRequest request = ListTransferLogsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListTransferLogsPagedResponse> future = dataTransferServiceClient.listTransferLogsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (TransferMessage element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listTransferLogsPagedCallable() { + return stub.listTransferLogsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns user facing log messages for the data transfer run. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   RunName parent = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]");
+   *   ListTransferLogsRequest request = ListTransferLogsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListTransferLogsResponse response = dataTransferServiceClient.listTransferLogsCallable().call(request);
+   *     for (TransferMessage element : response.getTransferMessagesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listTransferLogsCallable() { + return stub.listTransferLogsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns true if valid credentials exist for the given data source and requesting user. Some + * data sources doesn't support service account, so we need to talk to them on behalf of the end + * user. This API just checks whether we have OAuth token for the particular user, which is a + * pre-requisite before user can create a transfer config. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]");
+   *   CheckValidCredsResponse response = dataTransferServiceClient.checkValidCreds(name);
+   * }
+   * 
+ * + * @param name Required. The data source in the form: + * `projects/{project_id}/dataSources/{data_source_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CheckValidCredsResponse checkValidCreds(DataSourceName name) { + + CheckValidCredsRequest request = + CheckValidCredsRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return checkValidCreds(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns true if valid credentials exist for the given data source and requesting user. Some + * data sources doesn't support service account, so we need to talk to them on behalf of the end + * user. This API just checks whether we have OAuth token for the particular user, which is a + * pre-requisite before user can create a transfer config. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]");
+   *   CheckValidCredsResponse response = dataTransferServiceClient.checkValidCreds(name.toString());
+   * }
+   * 
+ * + * @param name Required. The data source in the form: + * `projects/{project_id}/dataSources/{data_source_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final CheckValidCredsResponse checkValidCreds(String name) { + + CheckValidCredsRequest request = CheckValidCredsRequest.newBuilder().setName(name).build(); + return checkValidCreds(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns true if valid credentials exist for the given data source and requesting user. Some + * data sources doesn't support service account, so we need to talk to them on behalf of the end + * user. This API just checks whether we have OAuth token for the particular user, which is a + * pre-requisite before user can create a transfer config. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]");
+   *   CheckValidCredsRequest request = CheckValidCredsRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   CheckValidCredsResponse response = dataTransferServiceClient.checkValidCreds(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 CheckValidCredsResponse checkValidCreds(CheckValidCredsRequest request) { + return checkValidCredsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns true if valid credentials exist for the given data source and requesting user. Some + * data sources doesn't support service account, so we need to talk to them on behalf of the end + * user. This API just checks whether we have OAuth token for the particular user, which is a + * pre-requisite before user can create a transfer config. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]");
+   *   CheckValidCredsRequest request = CheckValidCredsRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<CheckValidCredsResponse> future = dataTransferServiceClient.checkValidCredsCallable().futureCall(request);
+   *   // Do something
+   *   CheckValidCredsResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + checkValidCredsCallable() { + return stub.checkValidCredsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Start manual transfer runs to be executed now with schedule_time equal to current time. The + * transfer runs can be created for a time range where the run_time is between start_time + * (inclusive) and end_time (exclusive), or for a specific run_time. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   StartManualTransferRunsRequest request = StartManualTransferRunsRequest.newBuilder().build();
+   *   StartManualTransferRunsResponse response = dataTransferServiceClient.startManualTransferRuns(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 StartManualTransferRunsResponse startManualTransferRuns( + StartManualTransferRunsRequest request) { + return startManualTransferRunsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Start manual transfer runs to be executed now with schedule_time equal to current time. The + * transfer runs can be created for a time range where the run_time is between start_time + * (inclusive) and end_time (exclusive), or for a specific run_time. + * + *

Sample code: + * + *


+   * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+   *   StartManualTransferRunsRequest request = StartManualTransferRunsRequest.newBuilder().build();
+   *   ApiFuture<StartManualTransferRunsResponse> future = dataTransferServiceClient.startManualTransferRunsCallable().futureCall(request);
+   *   // Do something
+   *   StartManualTransferRunsResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + startManualTransferRunsCallable() { + return stub.startManualTransferRunsCallable(); + } + + @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 ListDataSourcesPagedResponse + extends AbstractPagedListResponse< + ListDataSourcesRequest, ListDataSourcesResponse, DataSource, ListDataSourcesPage, + ListDataSourcesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataSourcesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListDataSourcesPagedResponse apply(ListDataSourcesPage input) { + return new ListDataSourcesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListDataSourcesPagedResponse(ListDataSourcesPage page) { + super(page, ListDataSourcesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataSourcesPage + extends AbstractPage< + ListDataSourcesRequest, ListDataSourcesResponse, DataSource, ListDataSourcesPage> { + + private ListDataSourcesPage( + PageContext context, + ListDataSourcesResponse response) { + super(context, response); + } + + private static ListDataSourcesPage createEmptyPage() { + return new ListDataSourcesPage(null, null); + } + + @Override + protected ListDataSourcesPage createPage( + PageContext context, + ListDataSourcesResponse response) { + return new ListDataSourcesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataSourcesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataSourcesRequest, ListDataSourcesResponse, DataSource, ListDataSourcesPage, + ListDataSourcesFixedSizeCollection> { + + private ListDataSourcesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataSourcesFixedSizeCollection createEmptyCollection() { + return new ListDataSourcesFixedSizeCollection(null, 0); + } + + @Override + protected ListDataSourcesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDataSourcesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTransferConfigsPagedResponse + extends AbstractPagedListResponse< + ListTransferConfigsRequest, ListTransferConfigsResponse, TransferConfig, + ListTransferConfigsPage, ListTransferConfigsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTransferConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTransferConfigsPagedResponse apply(ListTransferConfigsPage input) { + return new ListTransferConfigsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTransferConfigsPagedResponse(ListTransferConfigsPage page) { + super(page, ListTransferConfigsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTransferConfigsPage + extends AbstractPage< + ListTransferConfigsRequest, ListTransferConfigsResponse, TransferConfig, + ListTransferConfigsPage> { + + private ListTransferConfigsPage( + PageContext + context, + ListTransferConfigsResponse response) { + super(context, response); + } + + private static ListTransferConfigsPage createEmptyPage() { + return new ListTransferConfigsPage(null, null); + } + + @Override + protected ListTransferConfigsPage createPage( + PageContext + context, + ListTransferConfigsResponse response) { + return new ListTransferConfigsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTransferConfigsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTransferConfigsRequest, ListTransferConfigsResponse, TransferConfig, + ListTransferConfigsPage, ListTransferConfigsFixedSizeCollection> { + + private ListTransferConfigsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTransferConfigsFixedSizeCollection createEmptyCollection() { + return new ListTransferConfigsFixedSizeCollection(null, 0); + } + + @Override + protected ListTransferConfigsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTransferConfigsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTransferRunsPagedResponse + extends AbstractPagedListResponse< + ListTransferRunsRequest, ListTransferRunsResponse, TransferRun, ListTransferRunsPage, + ListTransferRunsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTransferRunsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTransferRunsPagedResponse apply(ListTransferRunsPage input) { + return new ListTransferRunsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTransferRunsPagedResponse(ListTransferRunsPage page) { + super(page, ListTransferRunsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTransferRunsPage + extends AbstractPage< + ListTransferRunsRequest, ListTransferRunsResponse, TransferRun, ListTransferRunsPage> { + + private ListTransferRunsPage( + PageContext context, + ListTransferRunsResponse response) { + super(context, response); + } + + private static ListTransferRunsPage createEmptyPage() { + return new ListTransferRunsPage(null, null); + } + + @Override + protected ListTransferRunsPage createPage( + PageContext context, + ListTransferRunsResponse response) { + return new ListTransferRunsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTransferRunsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTransferRunsRequest, ListTransferRunsResponse, TransferRun, ListTransferRunsPage, + ListTransferRunsFixedSizeCollection> { + + private ListTransferRunsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTransferRunsFixedSizeCollection createEmptyCollection() { + return new ListTransferRunsFixedSizeCollection(null, 0); + } + + @Override + protected ListTransferRunsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTransferRunsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTransferLogsPagedResponse + extends AbstractPagedListResponse< + ListTransferLogsRequest, ListTransferLogsResponse, TransferMessage, ListTransferLogsPage, + ListTransferLogsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTransferLogsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTransferLogsPagedResponse apply(ListTransferLogsPage input) { + return new ListTransferLogsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTransferLogsPagedResponse(ListTransferLogsPage page) { + super(page, ListTransferLogsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTransferLogsPage + extends AbstractPage< + ListTransferLogsRequest, ListTransferLogsResponse, TransferMessage, + ListTransferLogsPage> { + + private ListTransferLogsPage( + PageContext context, + ListTransferLogsResponse response) { + super(context, response); + } + + private static ListTransferLogsPage createEmptyPage() { + return new ListTransferLogsPage(null, null); + } + + @Override + protected ListTransferLogsPage createPage( + PageContext context, + ListTransferLogsResponse response) { + return new ListTransferLogsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTransferLogsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTransferLogsRequest, ListTransferLogsResponse, TransferMessage, ListTransferLogsPage, + ListTransferLogsFixedSizeCollection> { + + private ListTransferLogsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTransferLogsFixedSizeCollection createEmptyCollection() { + return new ListTransferLogsFixedSizeCollection(null, 0); + } + + @Override + protected ListTransferLogsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTransferLogsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceSettings.java b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceSettings.java new file mode 100644 index 00000000..95563599 --- /dev/null +++ b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceSettings.java @@ -0,0 +1,343 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigquery.datatransfer.v1; + +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListDataSourcesPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferConfigsPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferLogsPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferRunsPagedResponse; + +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.bigquery.datatransfer.v1.stub.DataTransferServiceStubSettings; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link DataTransferServiceClient}. + * + *

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

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

+ * 
+ * DataTransferServiceSettings.Builder dataTransferServiceSettingsBuilder =
+ *     DataTransferServiceSettings.newBuilder();
+ * dataTransferServiceSettingsBuilder.getDataSourceSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * DataTransferServiceSettings dataTransferServiceSettings = dataTransferServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class DataTransferServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to getDataSource. */ + public UnaryCallSettings getDataSourceSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).getDataSourceSettings(); + } + + /** Returns the object with the settings used for calls to listDataSources. */ + public PagedCallSettings< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + listDataSourcesSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).listDataSourcesSettings(); + } + + /** Returns the object with the settings used for calls to createTransferConfig. */ + public UnaryCallSettings + createTransferConfigSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).createTransferConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateTransferConfig. */ + public UnaryCallSettings + updateTransferConfigSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).updateTransferConfigSettings(); + } + + /** Returns the object with the settings used for calls to deleteTransferConfig. */ + public UnaryCallSettings deleteTransferConfigSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).deleteTransferConfigSettings(); + } + + /** Returns the object with the settings used for calls to getTransferConfig. */ + public UnaryCallSettings getTransferConfigSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).getTransferConfigSettings(); + } + + /** Returns the object with the settings used for calls to listTransferConfigs. */ + public PagedCallSettings< + ListTransferConfigsRequest, ListTransferConfigsResponse, ListTransferConfigsPagedResponse> + listTransferConfigsSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).listTransferConfigsSettings(); + } + + /** Returns the object with the settings used for calls to scheduleTransferRuns. */ + public UnaryCallSettings + scheduleTransferRunsSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).scheduleTransferRunsSettings(); + } + + /** Returns the object with the settings used for calls to getTransferRun. */ + public UnaryCallSettings getTransferRunSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).getTransferRunSettings(); + } + + /** Returns the object with the settings used for calls to deleteTransferRun. */ + public UnaryCallSettings deleteTransferRunSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).deleteTransferRunSettings(); + } + + /** Returns the object with the settings used for calls to listTransferRuns. */ + public PagedCallSettings< + ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse> + listTransferRunsSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).listTransferRunsSettings(); + } + + /** Returns the object with the settings used for calls to listTransferLogs. */ + public PagedCallSettings< + ListTransferLogsRequest, ListTransferLogsResponse, ListTransferLogsPagedResponse> + listTransferLogsSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).listTransferLogsSettings(); + } + + /** Returns the object with the settings used for calls to checkValidCreds. */ + public UnaryCallSettings + checkValidCredsSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).checkValidCredsSettings(); + } + + /** Returns the object with the settings used for calls to startManualTransferRuns. */ + public UnaryCallSettings + startManualTransferRunsSettings() { + return ((DataTransferServiceStubSettings) getStubSettings()).startManualTransferRunsSettings(); + } + + public static final DataTransferServiceSettings create(DataTransferServiceStubSettings stub) + throws IOException { + return new DataTransferServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataTransferServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataTransferServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataTransferServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataTransferServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataTransferServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataTransferServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataTransferServiceStubSettings.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 DataTransferServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataTransferServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(DataTransferServiceStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(DataTransferServiceStubSettings.newBuilder()); + } + + protected Builder(DataTransferServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataTransferServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public DataTransferServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DataTransferServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getDataSource. */ + public UnaryCallSettings.Builder getDataSourceSettings() { + return getStubSettingsBuilder().getDataSourceSettings(); + } + + /** Returns the builder for the settings used for calls to listDataSources. */ + public PagedCallSettings.Builder< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + listDataSourcesSettings() { + return getStubSettingsBuilder().listDataSourcesSettings(); + } + + /** Returns the builder for the settings used for calls to createTransferConfig. */ + public UnaryCallSettings.Builder + createTransferConfigSettings() { + return getStubSettingsBuilder().createTransferConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateTransferConfig. */ + public UnaryCallSettings.Builder + updateTransferConfigSettings() { + return getStubSettingsBuilder().updateTransferConfigSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTransferConfig. */ + public UnaryCallSettings.Builder + deleteTransferConfigSettings() { + return getStubSettingsBuilder().deleteTransferConfigSettings(); + } + + /** Returns the builder for the settings used for calls to getTransferConfig. */ + public UnaryCallSettings.Builder + getTransferConfigSettings() { + return getStubSettingsBuilder().getTransferConfigSettings(); + } + + /** Returns the builder for the settings used for calls to listTransferConfigs. */ + public PagedCallSettings.Builder< + ListTransferConfigsRequest, ListTransferConfigsResponse, + ListTransferConfigsPagedResponse> + listTransferConfigsSettings() { + return getStubSettingsBuilder().listTransferConfigsSettings(); + } + + /** Returns the builder for the settings used for calls to scheduleTransferRuns. */ + public UnaryCallSettings.Builder + scheduleTransferRunsSettings() { + return getStubSettingsBuilder().scheduleTransferRunsSettings(); + } + + /** Returns the builder for the settings used for calls to getTransferRun. */ + public UnaryCallSettings.Builder getTransferRunSettings() { + return getStubSettingsBuilder().getTransferRunSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTransferRun. */ + public UnaryCallSettings.Builder deleteTransferRunSettings() { + return getStubSettingsBuilder().deleteTransferRunSettings(); + } + + /** Returns the builder for the settings used for calls to listTransferRuns. */ + public PagedCallSettings.Builder< + ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse> + listTransferRunsSettings() { + return getStubSettingsBuilder().listTransferRunsSettings(); + } + + /** Returns the builder for the settings used for calls to listTransferLogs. */ + public PagedCallSettings.Builder< + ListTransferLogsRequest, ListTransferLogsResponse, ListTransferLogsPagedResponse> + listTransferLogsSettings() { + return getStubSettingsBuilder().listTransferLogsSettings(); + } + + /** Returns the builder for the settings used for calls to checkValidCreds. */ + public UnaryCallSettings.Builder + checkValidCredsSettings() { + return getStubSettingsBuilder().checkValidCredsSettings(); + } + + /** Returns the builder for the settings used for calls to startManualTransferRuns. */ + public UnaryCallSettings.Builder< + StartManualTransferRunsRequest, StartManualTransferRunsResponse> + startManualTransferRunsSettings() { + return getStubSettingsBuilder().startManualTransferRunsSettings(); + } + + @Override + public DataTransferServiceSettings build() throws IOException { + return new DataTransferServiceSettings(this); + } + } +} diff --git a/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/package-info.java b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/package-info.java new file mode 100644 index 00000000..e05924fe --- /dev/null +++ b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/package-info.java @@ -0,0 +1,42 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * A client to BigQuery Data Transfer API. + * + *

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

========================= DataTransferServiceClient ========================= + * + *

Service Description: The Google BigQuery Data Transfer Service API enables BigQuery users to + * configure the transfer of their data from other Google Products into BigQuery. This service + * contains methods that are end user exposed. It backs up the frontend. + * + *

Sample for DataTransferServiceClient: + * + *

+ * 
+ * try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
+ *   DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]");
+ *   DataSource response = dataTransferServiceClient.getDataSource(name);
+ * }
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +package com.google.cloud.bigquery.datatransfer.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/DataTransferServiceStub.java b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/DataTransferServiceStub.java new file mode 100644 index 00000000..7b17db13 --- /dev/null +++ b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/DataTransferServiceStub.java @@ -0,0 +1,146 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigquery.datatransfer.v1.stub; + +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListDataSourcesPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferConfigsPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferLogsPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferRunsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest; +import com.google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse; +import com.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.DataSource; +import com.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest; +import com.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest; +import com.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse; +import com.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest; +import com.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse; +import com.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest; +import com.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.cloud.bigquery.datatransfer.v1.TransferRun; +import com.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for BigQuery Data Transfer API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class DataTransferServiceStub implements BackgroundResource { + + public UnaryCallable getDataSourceCallable() { + throw new UnsupportedOperationException("Not implemented: getDataSourceCallable()"); + } + + public UnaryCallable + listDataSourcesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDataSourcesPagedCallable()"); + } + + public UnaryCallable listDataSourcesCallable() { + throw new UnsupportedOperationException("Not implemented: listDataSourcesCallable()"); + } + + public UnaryCallable createTransferConfigCallable() { + throw new UnsupportedOperationException("Not implemented: createTransferConfigCallable()"); + } + + public UnaryCallable updateTransferConfigCallable() { + throw new UnsupportedOperationException("Not implemented: updateTransferConfigCallable()"); + } + + public UnaryCallable deleteTransferConfigCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTransferConfigCallable()"); + } + + public UnaryCallable getTransferConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getTransferConfigCallable()"); + } + + public UnaryCallable + listTransferConfigsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTransferConfigsPagedCallable()"); + } + + public UnaryCallable + listTransferConfigsCallable() { + throw new UnsupportedOperationException("Not implemented: listTransferConfigsCallable()"); + } + + public UnaryCallable + scheduleTransferRunsCallable() { + throw new UnsupportedOperationException("Not implemented: scheduleTransferRunsCallable()"); + } + + public UnaryCallable getTransferRunCallable() { + throw new UnsupportedOperationException("Not implemented: getTransferRunCallable()"); + } + + public UnaryCallable deleteTransferRunCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTransferRunCallable()"); + } + + public UnaryCallable + listTransferRunsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTransferRunsPagedCallable()"); + } + + public UnaryCallable + listTransferRunsCallable() { + throw new UnsupportedOperationException("Not implemented: listTransferRunsCallable()"); + } + + public UnaryCallable + listTransferLogsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTransferLogsPagedCallable()"); + } + + public UnaryCallable + listTransferLogsCallable() { + throw new UnsupportedOperationException("Not implemented: listTransferLogsCallable()"); + } + + public UnaryCallable checkValidCredsCallable() { + throw new UnsupportedOperationException("Not implemented: checkValidCredsCallable()"); + } + + public UnaryCallable + startManualTransferRunsCallable() { + throw new UnsupportedOperationException("Not implemented: startManualTransferRunsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/DataTransferServiceStubSettings.java b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/DataTransferServiceStubSettings.java new file mode 100644 index 00000000..f7302193 --- /dev/null +++ b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/DataTransferServiceStubSettings.java @@ -0,0 +1,904 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigquery.datatransfer.v1.stub; + +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListDataSourcesPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferConfigsPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferLogsPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferRunsPagedResponse; + +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.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.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest; +import com.google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse; +import com.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.DataSource; +import com.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest; +import com.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest; +import com.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse; +import com.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest; +import com.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse; +import com.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest; +import com.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.cloud.bigquery.datatransfer.v1.TransferMessage; +import com.google.cloud.bigquery.datatransfer.v1.TransferRun; +import com.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest; +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.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link DataTransferServiceStub}. + * + *

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

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

+ * 
+ * DataTransferServiceStubSettings.Builder dataTransferServiceSettingsBuilder =
+ *     DataTransferServiceStubSettings.newBuilder();
+ * dataTransferServiceSettingsBuilder.getDataSourceSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * DataTransferServiceStubSettings dataTransferServiceSettings = dataTransferServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class DataTransferServiceStubSettings 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 getDataSourceSettings; + private final PagedCallSettings< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + listDataSourcesSettings; + private final UnaryCallSettings + createTransferConfigSettings; + private final UnaryCallSettings + updateTransferConfigSettings; + private final UnaryCallSettings deleteTransferConfigSettings; + private final UnaryCallSettings + getTransferConfigSettings; + private final PagedCallSettings< + ListTransferConfigsRequest, ListTransferConfigsResponse, ListTransferConfigsPagedResponse> + listTransferConfigsSettings; + private final UnaryCallSettings + scheduleTransferRunsSettings; + private final UnaryCallSettings getTransferRunSettings; + private final UnaryCallSettings deleteTransferRunSettings; + private final PagedCallSettings< + ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse> + listTransferRunsSettings; + private final PagedCallSettings< + ListTransferLogsRequest, ListTransferLogsResponse, ListTransferLogsPagedResponse> + listTransferLogsSettings; + private final UnaryCallSettings + checkValidCredsSettings; + private final UnaryCallSettings + startManualTransferRunsSettings; + + /** Returns the object with the settings used for calls to getDataSource. */ + public UnaryCallSettings getDataSourceSettings() { + return getDataSourceSettings; + } + + /** Returns the object with the settings used for calls to listDataSources. */ + public PagedCallSettings< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + listDataSourcesSettings() { + return listDataSourcesSettings; + } + + /** Returns the object with the settings used for calls to createTransferConfig. */ + public UnaryCallSettings + createTransferConfigSettings() { + return createTransferConfigSettings; + } + + /** Returns the object with the settings used for calls to updateTransferConfig. */ + public UnaryCallSettings + updateTransferConfigSettings() { + return updateTransferConfigSettings; + } + + /** Returns the object with the settings used for calls to deleteTransferConfig. */ + public UnaryCallSettings deleteTransferConfigSettings() { + return deleteTransferConfigSettings; + } + + /** Returns the object with the settings used for calls to getTransferConfig. */ + public UnaryCallSettings getTransferConfigSettings() { + return getTransferConfigSettings; + } + + /** Returns the object with the settings used for calls to listTransferConfigs. */ + public PagedCallSettings< + ListTransferConfigsRequest, ListTransferConfigsResponse, ListTransferConfigsPagedResponse> + listTransferConfigsSettings() { + return listTransferConfigsSettings; + } + + /** Returns the object with the settings used for calls to scheduleTransferRuns. */ + public UnaryCallSettings + scheduleTransferRunsSettings() { + return scheduleTransferRunsSettings; + } + + /** Returns the object with the settings used for calls to getTransferRun. */ + public UnaryCallSettings getTransferRunSettings() { + return getTransferRunSettings; + } + + /** Returns the object with the settings used for calls to deleteTransferRun. */ + public UnaryCallSettings deleteTransferRunSettings() { + return deleteTransferRunSettings; + } + + /** Returns the object with the settings used for calls to listTransferRuns. */ + public PagedCallSettings< + ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse> + listTransferRunsSettings() { + return listTransferRunsSettings; + } + + /** Returns the object with the settings used for calls to listTransferLogs. */ + public PagedCallSettings< + ListTransferLogsRequest, ListTransferLogsResponse, ListTransferLogsPagedResponse> + listTransferLogsSettings() { + return listTransferLogsSettings; + } + + /** Returns the object with the settings used for calls to checkValidCreds. */ + public UnaryCallSettings + checkValidCredsSettings() { + return checkValidCredsSettings; + } + + /** Returns the object with the settings used for calls to startManualTransferRuns. */ + public UnaryCallSettings + startManualTransferRunsSettings() { + return startManualTransferRunsSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public DataTransferServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataTransferServiceStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + 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 "bigquerydatatransfer.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(DataTransferServiceStubSettings.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 DataTransferServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getDataSourceSettings = settingsBuilder.getDataSourceSettings().build(); + listDataSourcesSettings = settingsBuilder.listDataSourcesSettings().build(); + createTransferConfigSettings = settingsBuilder.createTransferConfigSettings().build(); + updateTransferConfigSettings = settingsBuilder.updateTransferConfigSettings().build(); + deleteTransferConfigSettings = settingsBuilder.deleteTransferConfigSettings().build(); + getTransferConfigSettings = settingsBuilder.getTransferConfigSettings().build(); + listTransferConfigsSettings = settingsBuilder.listTransferConfigsSettings().build(); + scheduleTransferRunsSettings = settingsBuilder.scheduleTransferRunsSettings().build(); + getTransferRunSettings = settingsBuilder.getTransferRunSettings().build(); + deleteTransferRunSettings = settingsBuilder.deleteTransferRunSettings().build(); + listTransferRunsSettings = settingsBuilder.listTransferRunsSettings().build(); + listTransferLogsSettings = settingsBuilder.listTransferLogsSettings().build(); + checkValidCredsSettings = settingsBuilder.checkValidCredsSettings().build(); + startManualTransferRunsSettings = settingsBuilder.startManualTransferRunsSettings().build(); + } + + private static final PagedListDescriptor< + ListDataSourcesRequest, ListDataSourcesResponse, DataSource> + LIST_DATA_SOURCES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataSourcesRequest injectToken( + ListDataSourcesRequest payload, String token) { + return ListDataSourcesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDataSourcesRequest injectPageSize( + ListDataSourcesRequest payload, int pageSize) { + return ListDataSourcesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDataSourcesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataSourcesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDataSourcesResponse payload) { + return payload.getDataSourcesList() != null + ? payload.getDataSourcesList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListTransferConfigsRequest, ListTransferConfigsResponse, TransferConfig> + LIST_TRANSFER_CONFIGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListTransferConfigsRequest, ListTransferConfigsResponse, TransferConfig>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTransferConfigsRequest injectToken( + ListTransferConfigsRequest payload, String token) { + return ListTransferConfigsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTransferConfigsRequest injectPageSize( + ListTransferConfigsRequest payload, int pageSize) { + return ListTransferConfigsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTransferConfigsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTransferConfigsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTransferConfigsResponse payload) { + return payload.getTransferConfigsList() != null + ? payload.getTransferConfigsList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListTransferRunsRequest, ListTransferRunsResponse, TransferRun> + LIST_TRANSFER_RUNS_PAGE_STR_DESC = + new PagedListDescriptor< + ListTransferRunsRequest, ListTransferRunsResponse, TransferRun>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTransferRunsRequest injectToken( + ListTransferRunsRequest payload, String token) { + return ListTransferRunsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTransferRunsRequest injectPageSize( + ListTransferRunsRequest payload, int pageSize) { + return ListTransferRunsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTransferRunsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTransferRunsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTransferRunsResponse payload) { + return payload.getTransferRunsList() != null + ? payload.getTransferRunsList() + : ImmutableList.of(); + } + }; + + private static final PagedListDescriptor< + ListTransferLogsRequest, ListTransferLogsResponse, TransferMessage> + LIST_TRANSFER_LOGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListTransferLogsRequest, ListTransferLogsResponse, TransferMessage>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTransferLogsRequest injectToken( + ListTransferLogsRequest payload, String token) { + return ListTransferLogsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTransferLogsRequest injectPageSize( + ListTransferLogsRequest payload, int pageSize) { + return ListTransferLogsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTransferLogsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTransferLogsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTransferLogsResponse payload) { + return payload.getTransferMessagesList() != null + ? payload.getTransferMessagesList() + : ImmutableList.of(); + } + }; + + private static final PagedListResponseFactory< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + LIST_DATA_SOURCES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDataSourcesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_DATA_SOURCES_PAGE_STR_DESC, request, context); + return ListDataSourcesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTransferConfigsRequest, ListTransferConfigsResponse, ListTransferConfigsPagedResponse> + LIST_TRANSFER_CONFIGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTransferConfigsRequest, ListTransferConfigsResponse, + ListTransferConfigsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTransferConfigsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_TRANSFER_CONFIGS_PAGE_STR_DESC, request, context); + return ListTransferConfigsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse> + LIST_TRANSFER_RUNS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTransferRunsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_TRANSFER_RUNS_PAGE_STR_DESC, request, context); + return ListTransferRunsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTransferLogsRequest, ListTransferLogsResponse, ListTransferLogsPagedResponse> + LIST_TRANSFER_LOGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTransferLogsRequest, ListTransferLogsResponse, ListTransferLogsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTransferLogsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_TRANSFER_LOGS_PAGE_STR_DESC, request, context); + return ListTransferLogsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Builder for DataTransferServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder getDataSourceSettings; + private final PagedCallSettings.Builder< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + listDataSourcesSettings; + private final UnaryCallSettings.Builder + createTransferConfigSettings; + private final UnaryCallSettings.Builder + updateTransferConfigSettings; + private final UnaryCallSettings.Builder + deleteTransferConfigSettings; + private final UnaryCallSettings.Builder + getTransferConfigSettings; + private final PagedCallSettings.Builder< + ListTransferConfigsRequest, ListTransferConfigsResponse, + ListTransferConfigsPagedResponse> + listTransferConfigsSettings; + private final UnaryCallSettings.Builder< + ScheduleTransferRunsRequest, ScheduleTransferRunsResponse> + scheduleTransferRunsSettings; + private final UnaryCallSettings.Builder + getTransferRunSettings; + private final UnaryCallSettings.Builder + deleteTransferRunSettings; + private final PagedCallSettings.Builder< + ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse> + listTransferRunsSettings; + private final PagedCallSettings.Builder< + ListTransferLogsRequest, ListTransferLogsResponse, ListTransferLogsPagedResponse> + listTransferLogsSettings; + private final UnaryCallSettings.Builder + checkValidCredsSettings; + private final UnaryCallSettings.Builder< + StartManualTransferRunsRequest, StartManualTransferRunsResponse> + startManualTransferRunsSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getDataSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listDataSourcesSettings = PagedCallSettings.newBuilder(LIST_DATA_SOURCES_PAGE_STR_FACT); + + createTransferConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateTransferConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteTransferConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getTransferConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listTransferConfigsSettings = + PagedCallSettings.newBuilder(LIST_TRANSFER_CONFIGS_PAGE_STR_FACT); + + scheduleTransferRunsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getTransferRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteTransferRunSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listTransferRunsSettings = PagedCallSettings.newBuilder(LIST_TRANSFER_RUNS_PAGE_STR_FACT); + + listTransferLogsSettings = PagedCallSettings.newBuilder(LIST_TRANSFER_LOGS_PAGE_STR_FACT); + + checkValidCredsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + startManualTransferRunsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getDataSourceSettings, + listDataSourcesSettings, + createTransferConfigSettings, + updateTransferConfigSettings, + deleteTransferConfigSettings, + getTransferConfigSettings, + listTransferConfigsSettings, + scheduleTransferRunsSettings, + getTransferRunSettings, + deleteTransferRunSettings, + listTransferRunsSettings, + listTransferLogsSettings, + checkValidCredsSettings, + startManualTransferRunsSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .getDataSourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listDataSourcesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createTransferConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateTransferConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteTransferConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getTransferConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listTransferConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .scheduleTransferRunsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getTransferRunSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteTransferRunSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listTransferRunsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listTransferLogsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .checkValidCredsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .startManualTransferRunsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(DataTransferServiceStubSettings settings) { + super(settings); + + getDataSourceSettings = settings.getDataSourceSettings.toBuilder(); + listDataSourcesSettings = settings.listDataSourcesSettings.toBuilder(); + createTransferConfigSettings = settings.createTransferConfigSettings.toBuilder(); + updateTransferConfigSettings = settings.updateTransferConfigSettings.toBuilder(); + deleteTransferConfigSettings = settings.deleteTransferConfigSettings.toBuilder(); + getTransferConfigSettings = settings.getTransferConfigSettings.toBuilder(); + listTransferConfigsSettings = settings.listTransferConfigsSettings.toBuilder(); + scheduleTransferRunsSettings = settings.scheduleTransferRunsSettings.toBuilder(); + getTransferRunSettings = settings.getTransferRunSettings.toBuilder(); + deleteTransferRunSettings = settings.deleteTransferRunSettings.toBuilder(); + listTransferRunsSettings = settings.listTransferRunsSettings.toBuilder(); + listTransferLogsSettings = settings.listTransferLogsSettings.toBuilder(); + checkValidCredsSettings = settings.checkValidCredsSettings.toBuilder(); + startManualTransferRunsSettings = settings.startManualTransferRunsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getDataSourceSettings, + listDataSourcesSettings, + createTransferConfigSettings, + updateTransferConfigSettings, + deleteTransferConfigSettings, + getTransferConfigSettings, + listTransferConfigsSettings, + scheduleTransferRunsSettings, + getTransferRunSettings, + deleteTransferRunSettings, + listTransferRunsSettings, + listTransferLogsSettings, + checkValidCredsSettings, + startManualTransferRunsSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getDataSource. */ + public UnaryCallSettings.Builder getDataSourceSettings() { + return getDataSourceSettings; + } + + /** Returns the builder for the settings used for calls to listDataSources. */ + public PagedCallSettings.Builder< + ListDataSourcesRequest, ListDataSourcesResponse, ListDataSourcesPagedResponse> + listDataSourcesSettings() { + return listDataSourcesSettings; + } + + /** Returns the builder for the settings used for calls to createTransferConfig. */ + public UnaryCallSettings.Builder + createTransferConfigSettings() { + return createTransferConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateTransferConfig. */ + public UnaryCallSettings.Builder + updateTransferConfigSettings() { + return updateTransferConfigSettings; + } + + /** Returns the builder for the settings used for calls to deleteTransferConfig. */ + public UnaryCallSettings.Builder + deleteTransferConfigSettings() { + return deleteTransferConfigSettings; + } + + /** Returns the builder for the settings used for calls to getTransferConfig. */ + public UnaryCallSettings.Builder + getTransferConfigSettings() { + return getTransferConfigSettings; + } + + /** Returns the builder for the settings used for calls to listTransferConfigs. */ + public PagedCallSettings.Builder< + ListTransferConfigsRequest, ListTransferConfigsResponse, + ListTransferConfigsPagedResponse> + listTransferConfigsSettings() { + return listTransferConfigsSettings; + } + + /** Returns the builder for the settings used for calls to scheduleTransferRuns. */ + public UnaryCallSettings.Builder + scheduleTransferRunsSettings() { + return scheduleTransferRunsSettings; + } + + /** Returns the builder for the settings used for calls to getTransferRun. */ + public UnaryCallSettings.Builder getTransferRunSettings() { + return getTransferRunSettings; + } + + /** Returns the builder for the settings used for calls to deleteTransferRun. */ + public UnaryCallSettings.Builder deleteTransferRunSettings() { + return deleteTransferRunSettings; + } + + /** Returns the builder for the settings used for calls to listTransferRuns. */ + public PagedCallSettings.Builder< + ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse> + listTransferRunsSettings() { + return listTransferRunsSettings; + } + + /** Returns the builder for the settings used for calls to listTransferLogs. */ + public PagedCallSettings.Builder< + ListTransferLogsRequest, ListTransferLogsResponse, ListTransferLogsPagedResponse> + listTransferLogsSettings() { + return listTransferLogsSettings; + } + + /** Returns the builder for the settings used for calls to checkValidCreds. */ + public UnaryCallSettings.Builder + checkValidCredsSettings() { + return checkValidCredsSettings; + } + + /** Returns the builder for the settings used for calls to startManualTransferRuns. */ + public UnaryCallSettings.Builder< + StartManualTransferRunsRequest, StartManualTransferRunsResponse> + startManualTransferRunsSettings() { + return startManualTransferRunsSettings; + } + + @Override + public DataTransferServiceStubSettings build() throws IOException { + return new DataTransferServiceStubSettings(this); + } + } +} diff --git a/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/GrpcDataTransferServiceCallableFactory.java b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/GrpcDataTransferServiceCallableFactory.java new file mode 100644 index 00000000..3e5ab12c --- /dev/null +++ b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/GrpcDataTransferServiceCallableFactory.java @@ -0,0 +1,116 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigquery.datatransfer.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for BigQuery Data Transfer API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcDataTransferServiceCallableFactory 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 pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/GrpcDataTransferServiceStub.java b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/GrpcDataTransferServiceStub.java new file mode 100644 index 00000000..9375afe1 --- /dev/null +++ b/google-cloud-bigquerydatastransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/GrpcDataTransferServiceStub.java @@ -0,0 +1,680 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigquery.datatransfer.v1.stub; + +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListDataSourcesPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferConfigsPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferLogsPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferRunsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.bigquery.datatransfer.v1.CheckValidCredsRequest; +import com.google.cloud.bigquery.datatransfer.v1.CheckValidCredsResponse; +import com.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.DataSource; +import com.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest; +import com.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest; +import com.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListDataSourcesRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListDataSourcesResponse; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferConfigsResponse; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferLogsRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferLogsResponse; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferRunsRequest; +import com.google.cloud.bigquery.datatransfer.v1.ListTransferRunsResponse; +import com.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsRequest; +import com.google.cloud.bigquery.datatransfer.v1.ScheduleTransferRunsResponse; +import com.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsRequest; +import com.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.cloud.bigquery.datatransfer.v1.TransferRun; +import com.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest; +import com.google.common.collect.ImmutableMap; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for BigQuery Data Transfer API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcDataTransferServiceStub extends DataTransferServiceStub { + + private static final MethodDescriptor + getDataSourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/GetDataSource") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDataSourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataSource.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listDataSourcesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/ListDataSources") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataSourcesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataSourcesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + createTransferConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/CreateTransferConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateTransferConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TransferConfig.getDefaultInstance())) + .build(); + private static final MethodDescriptor + updateTransferConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/UpdateTransferConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateTransferConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TransferConfig.getDefaultInstance())) + .build(); + private static final MethodDescriptor + deleteTransferConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/DeleteTransferConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteTransferConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + getTransferConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/GetTransferConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetTransferConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TransferConfig.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listTransferConfigsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/ListTransferConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTransferConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTransferConfigsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + scheduleTransferRunsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/ScheduleTransferRuns") + .setRequestMarshaller( + ProtoUtils.marshaller(ScheduleTransferRunsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ScheduleTransferRunsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + getTransferRunMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/GetTransferRun") + .setRequestMarshaller( + ProtoUtils.marshaller(GetTransferRunRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(TransferRun.getDefaultInstance())) + .build(); + private static final MethodDescriptor + deleteTransferRunMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/DeleteTransferRun") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteTransferRunRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listTransferRunsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/ListTransferRuns") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTransferRunsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTransferRunsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listTransferLogsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/ListTransferLogs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTransferLogsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTransferLogsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + checkValidCredsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/CheckValidCreds") + .setRequestMarshaller( + ProtoUtils.marshaller(CheckValidCredsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(CheckValidCredsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor< + StartManualTransferRunsRequest, StartManualTransferRunsResponse> + startManualTransferRunsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.bigquery.datatransfer.v1.DataTransferService/StartManualTransferRuns") + .setRequestMarshaller( + ProtoUtils.marshaller(StartManualTransferRunsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(StartManualTransferRunsResponse.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable getDataSourceCallable; + private final UnaryCallable + listDataSourcesCallable; + private final UnaryCallable + listDataSourcesPagedCallable; + private final UnaryCallable + createTransferConfigCallable; + private final UnaryCallable + updateTransferConfigCallable; + private final UnaryCallable deleteTransferConfigCallable; + private final UnaryCallable getTransferConfigCallable; + private final UnaryCallable + listTransferConfigsCallable; + private final UnaryCallable + listTransferConfigsPagedCallable; + private final UnaryCallable + scheduleTransferRunsCallable; + private final UnaryCallable getTransferRunCallable; + private final UnaryCallable deleteTransferRunCallable; + private final UnaryCallable + listTransferRunsCallable; + private final UnaryCallable + listTransferRunsPagedCallable; + private final UnaryCallable + listTransferLogsCallable; + private final UnaryCallable + listTransferLogsPagedCallable; + private final UnaryCallable + checkValidCredsCallable; + private final UnaryCallable + startManualTransferRunsCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataTransferServiceStub create(DataTransferServiceStubSettings settings) + throws IOException { + return new GrpcDataTransferServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataTransferServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataTransferServiceStub( + DataTransferServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataTransferServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataTransferServiceStub( + DataTransferServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataTransferServiceStub, 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 GrpcDataTransferServiceStub( + DataTransferServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDataTransferServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataTransferServiceStub, 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 GrpcDataTransferServiceStub( + DataTransferServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings getDataSourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataSourceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetDataSourceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listDataSourcesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDataSourcesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListDataSourcesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createTransferConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTransferConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateTransferConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + updateTransferConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateTransferConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateTransferConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "transfer_config.name", + String.valueOf(request.getTransferConfig().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteTransferConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTransferConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteTransferConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getTransferConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTransferConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetTransferConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listTransferConfigsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTransferConfigsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTransferConfigsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + scheduleTransferRunsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(scheduleTransferRunsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ScheduleTransferRunsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getTransferRunTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTransferRunMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetTransferRunRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteTransferRunTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTransferRunMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteTransferRunRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listTransferRunsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTransferRunsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTransferRunsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listTransferLogsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTransferLogsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTransferLogsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + checkValidCredsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(checkValidCredsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CheckValidCredsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + startManualTransferRunsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(startManualTransferRunsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(StartManualTransferRunsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + + this.getDataSourceCallable = + callableFactory.createUnaryCallable( + getDataSourceTransportSettings, settings.getDataSourceSettings(), clientContext); + this.listDataSourcesCallable = + callableFactory.createUnaryCallable( + listDataSourcesTransportSettings, settings.listDataSourcesSettings(), clientContext); + this.listDataSourcesPagedCallable = + callableFactory.createPagedCallable( + listDataSourcesTransportSettings, settings.listDataSourcesSettings(), clientContext); + this.createTransferConfigCallable = + callableFactory.createUnaryCallable( + createTransferConfigTransportSettings, + settings.createTransferConfigSettings(), + clientContext); + this.updateTransferConfigCallable = + callableFactory.createUnaryCallable( + updateTransferConfigTransportSettings, + settings.updateTransferConfigSettings(), + clientContext); + this.deleteTransferConfigCallable = + callableFactory.createUnaryCallable( + deleteTransferConfigTransportSettings, + settings.deleteTransferConfigSettings(), + clientContext); + this.getTransferConfigCallable = + callableFactory.createUnaryCallable( + getTransferConfigTransportSettings, + settings.getTransferConfigSettings(), + clientContext); + this.listTransferConfigsCallable = + callableFactory.createUnaryCallable( + listTransferConfigsTransportSettings, + settings.listTransferConfigsSettings(), + clientContext); + this.listTransferConfigsPagedCallable = + callableFactory.createPagedCallable( + listTransferConfigsTransportSettings, + settings.listTransferConfigsSettings(), + clientContext); + this.scheduleTransferRunsCallable = + callableFactory.createUnaryCallable( + scheduleTransferRunsTransportSettings, + settings.scheduleTransferRunsSettings(), + clientContext); + this.getTransferRunCallable = + callableFactory.createUnaryCallable( + getTransferRunTransportSettings, settings.getTransferRunSettings(), clientContext); + this.deleteTransferRunCallable = + callableFactory.createUnaryCallable( + deleteTransferRunTransportSettings, + settings.deleteTransferRunSettings(), + clientContext); + this.listTransferRunsCallable = + callableFactory.createUnaryCallable( + listTransferRunsTransportSettings, settings.listTransferRunsSettings(), clientContext); + this.listTransferRunsPagedCallable = + callableFactory.createPagedCallable( + listTransferRunsTransportSettings, settings.listTransferRunsSettings(), clientContext); + this.listTransferLogsCallable = + callableFactory.createUnaryCallable( + listTransferLogsTransportSettings, settings.listTransferLogsSettings(), clientContext); + this.listTransferLogsPagedCallable = + callableFactory.createPagedCallable( + listTransferLogsTransportSettings, settings.listTransferLogsSettings(), clientContext); + this.checkValidCredsCallable = + callableFactory.createUnaryCallable( + checkValidCredsTransportSettings, settings.checkValidCredsSettings(), clientContext); + this.startManualTransferRunsCallable = + callableFactory.createUnaryCallable( + startManualTransferRunsTransportSettings, + settings.startManualTransferRunsSettings(), + clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable getDataSourceCallable() { + return getDataSourceCallable; + } + + public UnaryCallable + listDataSourcesPagedCallable() { + return listDataSourcesPagedCallable; + } + + public UnaryCallable listDataSourcesCallable() { + return listDataSourcesCallable; + } + + public UnaryCallable createTransferConfigCallable() { + return createTransferConfigCallable; + } + + public UnaryCallable updateTransferConfigCallable() { + return updateTransferConfigCallable; + } + + public UnaryCallable deleteTransferConfigCallable() { + return deleteTransferConfigCallable; + } + + public UnaryCallable getTransferConfigCallable() { + return getTransferConfigCallable; + } + + public UnaryCallable + listTransferConfigsPagedCallable() { + return listTransferConfigsPagedCallable; + } + + public UnaryCallable + listTransferConfigsCallable() { + return listTransferConfigsCallable; + } + + public UnaryCallable + scheduleTransferRunsCallable() { + return scheduleTransferRunsCallable; + } + + public UnaryCallable getTransferRunCallable() { + return getTransferRunCallable; + } + + public UnaryCallable deleteTransferRunCallable() { + return deleteTransferRunCallable; + } + + public UnaryCallable + listTransferRunsPagedCallable() { + return listTransferRunsPagedCallable; + } + + public UnaryCallable + listTransferRunsCallable() { + return listTransferRunsCallable; + } + + public UnaryCallable + listTransferLogsPagedCallable() { + return listTransferLogsPagedCallable; + } + + public UnaryCallable + listTransferLogsCallable() { + return listTransferLogsCallable; + } + + public UnaryCallable checkValidCredsCallable() { + return checkValidCredsCallable; + } + + public UnaryCallable + startManualTransferRunsCallable() { + return startManualTransferRunsCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-bigquerydatastransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClientTest.java b/google-cloud-bigquerydatastransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClientTest.java new file mode 100644 index 00000000..bb0e77df --- /dev/null +++ b/google-cloud-bigquerydatastransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClientTest.java @@ -0,0 +1,731 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigquery.datatransfer.v1; + +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListDataSourcesPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferConfigsPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferLogsPagedResponse; +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListTransferRunsPagedResponse; + +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.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class DataTransferServiceClientTest { + private static MockDataTransferService mockDataTransferService; + private static MockServiceHelper serviceHelper; + private DataTransferServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockDataTransferService = new MockDataTransferService(); + serviceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockDataTransferService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + DataTransferServiceSettings settings = + DataTransferServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataTransferServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void getDataSourceTest() { + DataSourceName name2 = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]"); + String dataSourceId = "dataSourceId-1015796374"; + String displayName = "displayName1615086568"; + String description = "description-1724546052"; + String clientId = "clientId-1904089585"; + boolean supportsMultipleTransfers = true; + int updateDeadlineSeconds = 991471694; + String defaultSchedule = "defaultSchedule-800168235"; + boolean supportsCustomSchedule = true; + String helpUrl = "helpUrl-789431439"; + int defaultDataRefreshWindowDays = 1804935157; + boolean manualRunsDisabled = true; + DataSource expectedResponse = + DataSource.newBuilder() + .setName(name2.toString()) + .setDataSourceId(dataSourceId) + .setDisplayName(displayName) + .setDescription(description) + .setClientId(clientId) + .setSupportsMultipleTransfers(supportsMultipleTransfers) + .setUpdateDeadlineSeconds(updateDeadlineSeconds) + .setDefaultSchedule(defaultSchedule) + .setSupportsCustomSchedule(supportsCustomSchedule) + .setHelpUrl(helpUrl) + .setDefaultDataRefreshWindowDays(defaultDataRefreshWindowDays) + .setManualRunsDisabled(manualRunsDisabled) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]"); + + DataSource actualResponse = client.getDataSource(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataSourceRequest actualRequest = (GetDataSourceRequest) actualRequests.get(0); + + Assert.assertEquals(name, DataSourceNames.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getDataSourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]"); + + client.getDataSource(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listDataSourcesTest() { + String nextPageToken = ""; + DataSource dataSourcesElement = DataSource.newBuilder().build(); + List dataSources = Arrays.asList(dataSourcesElement); + ListDataSourcesResponse expectedResponse = + ListDataSourcesResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllDataSources(dataSources) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + ParentName parent = ProjectName.of("[PROJECT]"); + + ListDataSourcesPagedResponse pagedListResponse = client.listDataSources(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataSourcesList().get(0), resources.get(0)); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataSourcesRequest actualRequest = (ListDataSourcesRequest) actualRequests.get(0); + + Assert.assertEquals(parent, ParentNames.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listDataSourcesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + ParentName parent = ProjectName.of("[PROJECT]"); + + client.listDataSources(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void createTransferConfigTest() { + TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]"); + String destinationDatasetId = "destinationDatasetId1541564179"; + String displayName = "displayName1615086568"; + String dataSourceId = "dataSourceId-1015796374"; + String schedule = "schedule-697920873"; + int dataRefreshWindowDays = 327632845; + boolean disabled = true; + long userId = 147132913L; + String datasetRegion = "datasetRegion959248539"; + TransferConfig expectedResponse = + TransferConfig.newBuilder() + .setName(name.toString()) + .setDestinationDatasetId(destinationDatasetId) + .setDisplayName(displayName) + .setDataSourceId(dataSourceId) + .setSchedule(schedule) + .setDataRefreshWindowDays(dataRefreshWindowDays) + .setDisabled(disabled) + .setUserId(userId) + .setDatasetRegion(datasetRegion) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + ParentName parent = ProjectName.of("[PROJECT]"); + TransferConfig transferConfig = TransferConfig.newBuilder().build(); + + TransferConfig actualResponse = client.createTransferConfig(parent, transferConfig); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTransferConfigRequest actualRequest = (CreateTransferConfigRequest) actualRequests.get(0); + + Assert.assertEquals(parent, ParentNames.parse(actualRequest.getParent())); + Assert.assertEquals(transferConfig, actualRequest.getTransferConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createTransferConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + ParentName parent = ProjectName.of("[PROJECT]"); + TransferConfig transferConfig = TransferConfig.newBuilder().build(); + + client.createTransferConfig(parent, transferConfig); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateTransferConfigTest() { + TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]"); + String destinationDatasetId = "destinationDatasetId1541564179"; + String displayName = "displayName1615086568"; + String dataSourceId = "dataSourceId-1015796374"; + String schedule = "schedule-697920873"; + int dataRefreshWindowDays = 327632845; + boolean disabled = true; + long userId = 147132913L; + String datasetRegion = "datasetRegion959248539"; + TransferConfig expectedResponse = + TransferConfig.newBuilder() + .setName(name.toString()) + .setDestinationDatasetId(destinationDatasetId) + .setDisplayName(displayName) + .setDataSourceId(dataSourceId) + .setSchedule(schedule) + .setDataRefreshWindowDays(dataRefreshWindowDays) + .setDisabled(disabled) + .setUserId(userId) + .setDatasetRegion(datasetRegion) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + TransferConfig transferConfig = TransferConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + TransferConfig actualResponse = client.updateTransferConfig(transferConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateTransferConfigRequest actualRequest = (UpdateTransferConfigRequest) actualRequests.get(0); + + Assert.assertEquals(transferConfig, actualRequest.getTransferConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateTransferConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + TransferConfig transferConfig = TransferConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + client.updateTransferConfig(transferConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteTransferConfigTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataTransferService.addResponse(expectedResponse); + + TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]"); + + client.deleteTransferConfig(name); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTransferConfigRequest actualRequest = (DeleteTransferConfigRequest) actualRequests.get(0); + + Assert.assertEquals(name, TransferConfigNames.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteTransferConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]"); + + client.deleteTransferConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getTransferConfigTest() { + TransferConfigName name2 = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]"); + String destinationDatasetId = "destinationDatasetId1541564179"; + String displayName = "displayName1615086568"; + String dataSourceId = "dataSourceId-1015796374"; + String schedule = "schedule-697920873"; + int dataRefreshWindowDays = 327632845; + boolean disabled = true; + long userId = 147132913L; + String datasetRegion = "datasetRegion959248539"; + TransferConfig expectedResponse = + TransferConfig.newBuilder() + .setName(name2.toString()) + .setDestinationDatasetId(destinationDatasetId) + .setDisplayName(displayName) + .setDataSourceId(dataSourceId) + .setSchedule(schedule) + .setDataRefreshWindowDays(dataRefreshWindowDays) + .setDisabled(disabled) + .setUserId(userId) + .setDatasetRegion(datasetRegion) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]"); + + TransferConfig actualResponse = client.getTransferConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTransferConfigRequest actualRequest = (GetTransferConfigRequest) actualRequests.get(0); + + Assert.assertEquals(name, TransferConfigNames.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getTransferConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + TransferConfigName name = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]"); + + client.getTransferConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listTransferConfigsTest() { + String nextPageToken = ""; + TransferConfig transferConfigsElement = TransferConfig.newBuilder().build(); + List transferConfigs = Arrays.asList(transferConfigsElement); + ListTransferConfigsResponse expectedResponse = + ListTransferConfigsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllTransferConfigs(transferConfigs) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + ParentName parent = ProjectName.of("[PROJECT]"); + + ListTransferConfigsPagedResponse pagedListResponse = client.listTransferConfigs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTransferConfigsList().get(0), resources.get(0)); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTransferConfigsRequest actualRequest = (ListTransferConfigsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, ParentNames.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listTransferConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + ParentName parent = ProjectName.of("[PROJECT]"); + + client.listTransferConfigs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void scheduleTransferRunsTest() { + ScheduleTransferRunsResponse expectedResponse = + ScheduleTransferRunsResponse.newBuilder().build(); + mockDataTransferService.addResponse(expectedResponse); + + TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]"); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + + ScheduleTransferRunsResponse actualResponse = + client.scheduleTransferRuns(parent, startTime, endTime); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ScheduleTransferRunsRequest actualRequest = (ScheduleTransferRunsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TransferConfigNames.parse(actualRequest.getParent())); + Assert.assertEquals(startTime, actualRequest.getStartTime()); + Assert.assertEquals(endTime, actualRequest.getEndTime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void scheduleTransferRunsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]"); + Timestamp startTime = Timestamp.newBuilder().build(); + Timestamp endTime = Timestamp.newBuilder().build(); + + client.scheduleTransferRuns(parent, startTime, endTime); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getTransferRunTest() { + RunName name2 = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]"); + String destinationDatasetId = "destinationDatasetId1541564179"; + String dataSourceId = "dataSourceId-1015796374"; + long userId = 147132913L; + String schedule = "schedule-697920873"; + TransferRun expectedResponse = + TransferRun.newBuilder() + .setName(name2.toString()) + .setDestinationDatasetId(destinationDatasetId) + .setDataSourceId(dataSourceId) + .setUserId(userId) + .setSchedule(schedule) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + RunName name = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]"); + + TransferRun actualResponse = client.getTransferRun(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTransferRunRequest actualRequest = (GetTransferRunRequest) actualRequests.get(0); + + Assert.assertEquals(name, RunNames.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getTransferRunExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + RunName name = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]"); + + client.getTransferRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteTransferRunTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockDataTransferService.addResponse(expectedResponse); + + RunName name = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]"); + + client.deleteTransferRun(name); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTransferRunRequest actualRequest = (DeleteTransferRunRequest) actualRequests.get(0); + + Assert.assertEquals(name, RunNames.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteTransferRunExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + RunName name = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]"); + + client.deleteTransferRun(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listTransferRunsTest() { + String nextPageToken = ""; + TransferRun transferRunsElement = TransferRun.newBuilder().build(); + List transferRuns = Arrays.asList(transferRunsElement); + ListTransferRunsResponse expectedResponse = + ListTransferRunsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllTransferRuns(transferRuns) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]"); + + ListTransferRunsPagedResponse pagedListResponse = client.listTransferRuns(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTransferRunsList().get(0), resources.get(0)); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTransferRunsRequest actualRequest = (ListTransferRunsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, TransferConfigNames.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listTransferRunsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + TransferConfigName parent = ProjectTransferConfigName.of("[PROJECT]", "[TRANSFER_CONFIG]"); + + client.listTransferRuns(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listTransferLogsTest() { + String nextPageToken = ""; + TransferMessage transferMessagesElement = TransferMessage.newBuilder().build(); + List transferMessages = Arrays.asList(transferMessagesElement); + ListTransferLogsResponse expectedResponse = + ListTransferLogsResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllTransferMessages(transferMessages) + .build(); + mockDataTransferService.addResponse(expectedResponse); + + RunName parent = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]"); + + ListTransferLogsPagedResponse pagedListResponse = client.listTransferLogs(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTransferMessagesList().get(0), resources.get(0)); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTransferLogsRequest actualRequest = (ListTransferLogsRequest) actualRequests.get(0); + + Assert.assertEquals(parent, RunNames.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listTransferLogsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + RunName parent = ProjectRunName.of("[PROJECT]", "[TRANSFER_CONFIG]", "[RUN]"); + + client.listTransferLogs(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void checkValidCredsTest() { + boolean hasValidCreds = false; + CheckValidCredsResponse expectedResponse = + CheckValidCredsResponse.newBuilder().setHasValidCreds(hasValidCreds).build(); + mockDataTransferService.addResponse(expectedResponse); + + DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]"); + + CheckValidCredsResponse actualResponse = client.checkValidCreds(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTransferService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CheckValidCredsRequest actualRequest = (CheckValidCredsRequest) actualRequests.get(0); + + Assert.assertEquals(name, DataSourceNames.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void checkValidCredsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockDataTransferService.addException(exception); + + try { + DataSourceName name = ProjectDataSourceName.of("[PROJECT]", "[DATA_SOURCE]"); + + client.checkValidCreds(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-bigquerydatastransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceSmokeTest.java b/google-cloud-bigquerydatastransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceSmokeTest.java new file mode 100644 index 00000000..e0d72760 --- /dev/null +++ b/google-cloud-bigquerydatastransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceSmokeTest.java @@ -0,0 +1,64 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigquery.datatransfer.v1; + +import static com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient.ListDataSourcesPagedResponse; + +import com.google.common.base.Preconditions; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class DataTransferServiceSmokeTest { + private static final String PROJECT_ENV_NAME = "GOOGLE_CLOUD_PROJECT"; + private static final String LEGACY_PROJECT_ENV_NAME = "GCLOUD_PROJECT"; + + @Test + public void run() { + main(null); + } + + public static void main(String args[]) { + Logger.getLogger("").setLevel(Level.WARNING); + try { + executeNoCatch(getProjectId()); + System.out.println("OK"); + } catch (Exception e) { + System.err.println("Failed with exception:"); + e.printStackTrace(System.err); + System.exit(1); + } + } + + public static void executeNoCatch(String projectId) throws Exception { + try (DataTransferServiceClient client = DataTransferServiceClient.create()) { + ParentName parent = LocationName.of(projectId, "us-central1"); + + ListDataSourcesPagedResponse pagedResponse = client.listDataSources(parent); + } + } + + private static String getProjectId() { + String projectId = System.getProperty(PROJECT_ENV_NAME, System.getenv(PROJECT_ENV_NAME)); + if (projectId == null) { + projectId = + System.getProperty(LEGACY_PROJECT_ENV_NAME, System.getenv(LEGACY_PROJECT_ENV_NAME)); + } + Preconditions.checkArgument(projectId != null, "A project ID is required."); + return projectId; + } +} diff --git a/google-cloud-bigquerydatastransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/MockDataTransferService.java b/google-cloud-bigquerydatastransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/MockDataTransferService.java new file mode 100644 index 00000000..f36aabbe --- /dev/null +++ b/google-cloud-bigquerydatastransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/MockDataTransferService.java @@ -0,0 +1,57 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigquery.datatransfer.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockDataTransferService implements MockGrpcService { + private final MockDataTransferServiceImpl serviceImpl; + + public MockDataTransferService() { + serviceImpl = new MockDataTransferServiceImpl(); + } + + @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-bigquerydatastransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/MockDataTransferServiceImpl.java b/google-cloud-bigquerydatastransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/MockDataTransferServiceImpl.java new file mode 100644 index 00000000..f5dd2bce --- /dev/null +++ b/google-cloud-bigquerydatastransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/MockDataTransferServiceImpl.java @@ -0,0 +1,272 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.bigquery.datatransfer.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceGrpc.DataTransferServiceImplBase; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockDataTransferServiceImpl extends DataTransferServiceImplBase { + private List requests; + private Queue responses; + + public MockDataTransferServiceImpl() { + 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 getDataSource( + GetDataSourceRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof DataSource) { + requests.add(request); + responseObserver.onNext((DataSource) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listDataSources( + ListDataSourcesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListDataSourcesResponse) { + requests.add(request); + responseObserver.onNext((ListDataSourcesResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createTransferConfig( + CreateTransferConfigRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TransferConfig) { + requests.add(request); + responseObserver.onNext((TransferConfig) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateTransferConfig( + UpdateTransferConfigRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TransferConfig) { + requests.add(request); + responseObserver.onNext((TransferConfig) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteTransferConfig( + DeleteTransferConfigRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + 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("Unrecognized response type")); + } + } + + @Override + public void getTransferConfig( + GetTransferConfigRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TransferConfig) { + requests.add(request); + responseObserver.onNext((TransferConfig) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listTransferConfigs( + ListTransferConfigsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTransferConfigsResponse) { + requests.add(request); + responseObserver.onNext((ListTransferConfigsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void scheduleTransferRuns( + ScheduleTransferRunsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ScheduleTransferRunsResponse) { + requests.add(request); + responseObserver.onNext((ScheduleTransferRunsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void startManualTransferRuns( + StartManualTransferRunsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof StartManualTransferRunsResponse) { + requests.add(request); + responseObserver.onNext((StartManualTransferRunsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getTransferRun( + GetTransferRunRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TransferRun) { + requests.add(request); + responseObserver.onNext((TransferRun) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteTransferRun( + DeleteTransferRunRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + 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("Unrecognized response type")); + } + } + + @Override + public void listTransferRuns( + ListTransferRunsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTransferRunsResponse) { + requests.add(request); + responseObserver.onNext((ListTransferRunsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listTransferLogs( + ListTransferLogsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTransferLogsResponse) { + requests.add(request); + responseObserver.onNext((ListTransferLogsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void checkValidCreds( + CheckValidCredsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof CheckValidCredsResponse) { + requests.add(request); + responseObserver.onNext((CheckValidCredsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-bigquerydatatransfer-bom/pom.xml b/google-cloud-bigquerydatatransfer-bom/pom.xml index f74dd7f8..916769a5 100644 --- a/google-cloud-bigquerydatatransfer-bom/pom.xml +++ b/google-cloud-bigquerydatatransfer-bom/pom.xml @@ -14,7 +14,7 @@ Google Cloud bigquerydatatransfer BOM https://github.com/googleapis/java-bigquerydatatransfer - BOM for fixme + BOM for BigQuery DataTransfer diff --git a/google-cloud-bigquerydatatransfer/pom.xml b/google-cloud-bigquerydatatransfer/pom.xml index 2a91f2b3..51cd7ca1 100644 --- a/google-cloud-bigquerydatatransfer/pom.xml +++ b/google-cloud-bigquerydatatransfer/pom.xml @@ -5,9 +5,9 @@ google-cloud-bigquerydatatransfer 0.120.1-beta-SNAPSHOT jar - fixme + BigQuery DataTransfer https://github.com/googleapis/java-bigquerydatatransfer - fixme + BigQuery DataTransfer com.google.cloud google-cloud-bigquerydatatransfer-parent diff --git a/grpc-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceServiceGrpc.java b/grpc-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceServiceGrpc.java index 7233470a..f0a78da9 100644 --- a/grpc-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceServiceGrpc.java +++ b/grpc-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceServiceGrpc.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.google.cloud.bigquery.datatransfer.v1; import static io.grpc.MethodDescriptor.generateFullMethodName; diff --git a/grpc-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceGrpc.java b/grpc-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceGrpc.java index 8f6423ed..579d3132 100644 --- a/grpc-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceGrpc.java +++ b/grpc-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceGrpc.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.google.cloud.bigquery.datatransfer.v1; import static io.grpc.MethodDescriptor.generateFullMethodName; diff --git a/java.header b/java.header new file mode 100644 index 00000000..3a9b503a --- /dev/null +++ b/java.header @@ -0,0 +1,15 @@ +^/\*$ +^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)( All [rR]ights [rR]eserved\.)?$ +^ \*$ +^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ +^ \* you may not use this file except in compliance with the License\.$ +^ \* You may obtain a copy of the License at$ +^ \*$ +^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ +^ \*$ +^ \* Unless required by applicable law or agreed to in writing, software$ +^ \* distributed under the License is distributed on an "AS IS" BASIS,$ +^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$ +^ \* See the License for the specific language governing permissions and$ +^ \* limitations under the License\.$ +^ \*/$ diff --git a/license-checks.xml b/license-checks.xml new file mode 100644 index 00000000..6597fced --- /dev/null +++ b/license-checks.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/pom.xml b/pom.xml index ad501381..b04e5489 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ google-cloud-bigquerydatatransfer-parent pom 0.120.1-beta-SNAPSHOT - fixme Parent + BigQuery DataTransfer Parent https://github.com/googleapis/java-bigquerydatatransfer Java idiomatic client for Google Cloud Platform services. diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsRequest.java index c5475afb..fc0add54 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsRequestOrBuilder.java index bd07a1c2..80034727 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsResponse.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsResponse.java index a508fa8d..061554db 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsResponse.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsResponse.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsResponseOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsResponseOrBuilder.java index 1de17225..b156f598 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsResponseOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CheckValidCredsResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequest.java index 79d4fc79..83ce0401 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequestOrBuilder.java index 592ac1db..21efc1f1 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateDataSourceDefinitionRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateTransferConfigRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateTransferConfigRequest.java index 4ed393fe..9142bd20 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateTransferConfigRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateTransferConfigRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateTransferConfigRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateTransferConfigRequestOrBuilder.java index f8496a93..dfd0c222 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateTransferConfigRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/CreateTransferConfigRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSource.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSource.java index 010a228c..e5073298 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSource.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSource.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinition.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinition.java index 981112cf..10d92df3 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinition.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinition.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinitionOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinitionOrBuilder.java index 30943f88..4306d503 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinitionOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceDefinitionOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceName.java index 79a4ac1a..8a0ee889 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceNames.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceNames.java index 738dc15d..03275f25 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceNames.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceNames.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceOrBuilder.java index 95e213cc..69c5a093 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceParameter.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceParameter.java index c7a4dcd0..d73ce1cd 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceParameter.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceParameter.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceParameterOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceParameterOrBuilder.java index 5a0eaba7..7f27abbd 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceParameterOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceParameterOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceProto.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceProto.java index 8166ab1a..4543b607 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceProto.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataSourceProto.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferProto.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferProto.java index 1dd8c71a..713c5506 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferProto.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferProto.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequest.java index 74b03799..e0404c2b 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequestOrBuilder.java index 8c228b91..06ae7ab9 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteDataSourceDefinitionRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferConfigRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferConfigRequest.java index 200c2316..458ba12c 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferConfigRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferConfigRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferConfigRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferConfigRequestOrBuilder.java index 7da190a6..a3005e8a 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferConfigRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferConfigRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferRunRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferRunRequest.java index e940472d..180f4b15 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferRunRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferRunRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferRunRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferRunRequestOrBuilder.java index e84d4ca8..7629381c 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferRunRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DeleteTransferRunRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequest.java index 56daa6ba..f4a817ed 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequestOrBuilder.java index 9aafd6e5..429930d0 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/FinishRunRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequest.java index a5b44b10..1744e902 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequestOrBuilder.java index ea41a3cf..50a90f6b 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceDefinitionRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceRequest.java index 7548ae4f..f0ebbb02 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceRequestOrBuilder.java index fac37e70..3dd3192a 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetDataSourceRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferConfigRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferConfigRequest.java index 6ffea181..30cc9144 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferConfigRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferConfigRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferConfigRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferConfigRequestOrBuilder.java index a2b1f423..5ae695c3 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferConfigRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferConfigRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferRunRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferRunRequest.java index 813a3bf8..cbe5a946 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferRunRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferRunRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferRunRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferRunRequestOrBuilder.java index 701407f4..d3684ad9 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferRunRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/GetTransferRunRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfo.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfo.java index 350d6e37..32e6173f 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfo.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfo.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfoOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfoOrBuilder.java index 8bb79170..b710652b 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfoOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ImportedDataInfoOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequest.java index 8e104a21..97fe354e 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequestOrBuilder.java index 856a6df6..70927742 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponse.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponse.java index b7f31ed3..2c07b2cb 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponse.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponse.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponseOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponseOrBuilder.java index 662c1556..22123101 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponseOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourceDefinitionsResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesRequest.java index 3da77a47..492be930 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesRequestOrBuilder.java index 2017067f..86140644 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesResponse.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesResponse.java index a3a68804..054035cc 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesResponse.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesResponse.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesResponseOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesResponseOrBuilder.java index f7ed3da4..d6212b43 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesResponseOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListDataSourcesResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsRequest.java index 018cccb7..03668416 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsRequestOrBuilder.java index bb746bbe..aef8af3b 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsResponse.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsResponse.java index efe93772..77e60d47 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsResponse.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsResponse.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsResponseOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsResponseOrBuilder.java index 81fa578d..33507387 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsResponseOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferConfigsResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsRequest.java index 3b2a6669..51bd22f4 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsRequestOrBuilder.java index 0140ab3f..95755919 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsResponse.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsResponse.java index bd4dfb3d..4501fdef 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsResponse.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsResponse.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsResponseOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsResponseOrBuilder.java index bd06780c..64a5aab2 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsResponseOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferLogsResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsRequest.java index 6b089436..a2bbc24c 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsRequestOrBuilder.java index 38e6e489..7848cc5d 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsResponse.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsResponse.java index a3a58daa..08082c64 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsResponse.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsResponse.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsResponseOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsResponseOrBuilder.java index 2cb9a8ad..cf9bbf8a 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsResponseOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ListTransferRunsResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationDataSourceName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationDataSourceName.java index 7a1c327c..83160b0e 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationDataSourceName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationDataSourceName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationName.java index bbe6f550..2159e023 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationRunName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationRunName.java index 61321f65..ff5fab56 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationRunName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationRunName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationTransferConfigName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationTransferConfigName.java index 9db87ea5..e7da1e97 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationTransferConfigName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LocationTransferConfigName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequest.java index dbcbf48f..e0aa9cd0 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequestOrBuilder.java index 865d0b22..9fc59cb8 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/LogTransferRunMessagesRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ParentName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ParentName.java index 8351366e..ca66fe0c 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ParentName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ParentName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ParentNames.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ParentNames.java index 8a86d10c..cc844559 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ParentNames.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ParentNames.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectDataSourceName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectDataSourceName.java index fe0fce4e..424d2d5f 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectDataSourceName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectDataSourceName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectName.java index fb05ffc7..fa685e76 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectRunName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectRunName.java index 4bdaf28c..38831760 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectRunName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectRunName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectTransferConfigName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectTransferConfigName.java index d46ea8d7..b4d2ed83 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectTransferConfigName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ProjectTransferConfigName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunName.java index 6ecd4cea..3ae3dbef 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunNames.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunNames.java index 9108dbfe..18ef3098 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunNames.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/RunNames.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleOptions.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleOptions.java index 06955a51..56baaf1a 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleOptions.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleOptions.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/transfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleOptionsOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleOptionsOrBuilder.java index e18aba38..7b867678 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleOptionsOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleOptionsOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/transfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsRequest.java index f26aad79..c39699f5 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsRequestOrBuilder.java index 012bd2b6..7a821fdf 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsResponse.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsResponse.java index b5ce961d..63539cce 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsResponse.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsResponse.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsResponseOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsResponseOrBuilder.java index 38604add..3d961aa8 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsResponseOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/ScheduleTransferRunsResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequest.java index 28841ef7..ca4b72f4 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequestOrBuilder.java index 94411a3c..de3c4d2b 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartBigQueryJobsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsRequest.java index 2e082c51..8d2e3fbc 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsRequestOrBuilder.java index 1fd036ff..05c47a89 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsResponse.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsResponse.java index 308bb03d..7a5ded44 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsResponse.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsResponse.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsResponseOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsResponseOrBuilder.java index 9584e384..c2a80441 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsResponseOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/StartManualTransferRunsResponseOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfig.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfig.java index 2c71a917..70a1c6e2 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfig.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfig.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/transfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigName.java index c5eb6012..a7cdaa81 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigNames.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigNames.java index 232c14e7..ccc1577f 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigNames.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigNames.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigOrBuilder.java index 175de634..f6a5b276 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferConfigOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/transfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferMessage.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferMessage.java index 1d50af89..abd1061a 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferMessage.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferMessage.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/transfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferMessageOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferMessageOrBuilder.java index caf62d6d..30601d4c 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferMessageOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferMessageOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/transfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferProto.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferProto.java index 76b3b470..a8561129 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferProto.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferProto.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/transfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferRun.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferRun.java index b8d26bd9..0332b7ca 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferRun.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferRun.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/transfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferRunOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferRunOrBuilder.java index 536ab676..a4a93bec 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferRunOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferRunOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/transfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferState.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferState.java index 9f298c41..7fe056b3 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferState.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferState.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/transfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferType.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferType.java index b707188b..95489bf2 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferType.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/TransferType.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/transfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedDataSourceName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedDataSourceName.java index 2933432a..367c6f9c 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedDataSourceName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedDataSourceName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedParentName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedParentName.java index 073d69d5..381ae996 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedParentName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedParentName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedRunName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedRunName.java index 8ae0aaca..7dc811c8 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedRunName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedRunName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedTransferConfigName.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedTransferConfigName.java index 1925d69a..94d21b0e 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedTransferConfigName.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UntypedTransferConfigName.java @@ -1,15 +1,17 @@ /* - * Copyright 2018 Google LLC + * 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 + * Licensed under the Apache License, Version 2.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 + * https://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.google.cloud.bigquery.datatransfer.v1; diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequest.java index 62ee8f35..ed438e76 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequestOrBuilder.java index 54791d1b..6c1e0e80 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateDataSourceDefinitionRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferConfigRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferConfigRequest.java index 9fa34580..76fe7b53 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferConfigRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferConfigRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferConfigRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferConfigRequestOrBuilder.java index fd3cd53f..fc032763 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferConfigRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferConfigRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datatransfer.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequest.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequest.java index d89412c3..1059839d 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequest.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequest.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequestOrBuilder.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequestOrBuilder.java index 1e7044e0..abec4940 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequestOrBuilder.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/UpdateTransferRunRequestOrBuilder.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/WriteDisposition.java b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/WriteDisposition.java index 168f0a63..60174391 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/WriteDisposition.java +++ b/proto-google-cloud-bigquerydatatransfer-v1/src/main/java/com/google/cloud/bigquery/datatransfer/v1/WriteDisposition.java @@ -1,3 +1,18 @@ +/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/cloud/bigquery/datatransfer/v1/datasource.proto diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..99810470 --- /dev/null +++ b/renovate.json @@ -0,0 +1,27 @@ +{ + "extends": [ + "config:base" + ], + "ignoreDeps": [], + "packageRules": [ + { + "managers": ["maven"], + "packageNames": ["com.google.guava:guava*"], + "versionScheme": "docker" + }, + { + "packagePatterns": ["^io.grpc:grpc-"], + "groupName": "gRPC packages" + }, + { + "packagePatterns": ["^com.google.protobuf:protobuf-"], + "groupName": "Protobuf packages" + }, + { + "packagePatterns": ["^io.opencensus:opencensus-"], + "groupName": "OpenCensus packages" + } + ], + "semanticCommits": true, + "semanticCommitType": "deps" +} diff --git a/synth.metadata b/synth.metadata index 3e3c29bd..2f0764d4 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-11-19T08:33:42.512737Z", + "updateTime": "2019-12-05T23:06:05.440998Z", "sources": [ { "generator": { @@ -12,8 +12,15 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a", - "internalRef": "281088257" + "sha": "b10e4547017ca529ac8d183e839f3c272e1c13de", + "internalRef": "284059574" + } + }, + { + "template": { + "name": "java_library", + "origin": "synthtool.gcp", + "version": "2019.10.17" } } ], diff --git a/synth.py b/synth.py index 8ec15ac0..2302817f 100644 --- a/synth.py +++ b/synth.py @@ -1,4 +1,4 @@ -# Copyright 2018 Google LLC +# 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. @@ -20,9 +20,43 @@ gapic = gcp.GAPICGenerator() +protobuf_header = "// Generated by the protocol buffer compiler. DO NOT EDIT!" +# License header +license_header = """/* + * 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 + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +""" +bad_license_header = """/\\* + \\* Copyright 2018 Google LLC + \\* + \\* Licensed under the Apache License, Version 2.0 \\(the "License"\\); you may not use this file except + \\* in compliance with the License. You may obtain a copy of the License at + \\* + \\* http://www.apache.org/licenses/LICENSE-2.0 + \\* + \\* Unless required by applicable law or agreed to in writing, software distributed under the License + \\* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + \\* or implied. See the License for the specific language governing permissions and limitations under + \\* the License. + \\*/ +""" + service = 'bigquerydatatransfer' versions = ['v1'] config_pattern = '/google/cloud/bigquery/datatransfer/artman_bigquerydatatransfer.yaml' +package = 'com.google.cloud.bigquery.datatransfer.v1' for version in versions: library = gapic.java_library( @@ -31,10 +65,39 @@ config_path=config_pattern.format(version=version), artman_output_name='') - s.copy(library / f'gapic-google-cloud-{service}-{version}/src', 'src') - s.copy(library / f'grpc-google-cloud-{service}-{version}/src', f'../../google-api-grpc/grpc-google-cloud-{service}-{version}/src') - s.copy(library / f'proto-google-cloud-{service}-{version}/src', f'../../google-api-grpc/proto-google-cloud-{service}-{version}/src') + s.replace( + library / f'proto-google-cloud-{service}-{version}/src/**/*.java', + protobuf_header, + f'{license_header}{protobuf_header}' + ) + + s.replace( + library / f'grpc-google-cloud-{service}-{version}/src/**/*.java', + bad_license_header, + license_header + ) + s.replace( + library / f'proto-google-cloud-{service}-{version}/src/**/*.java', + bad_license_header, + license_header + ) + + s.replace( + library / f'grpc-google-cloud-{service}-{version}/src/**/*.java', + f'package {package};', + f'{license_header}package {package};' + ) + + s.copy(library / f'gapic-google-cloud-{service}-{version}/src', f'google-cloud-{service}/src') + s.copy(library / f'grpc-google-cloud-{service}-{version}/src', f'grpc-google-cloud-{service}-{version}/src') + s.copy(library / f'proto-google-cloud-{service}-{version}/src', f'proto-google-cloud-{service}-{version}/src') + + java.format_code(f'google-cloud-{service}/src') + java.format_code(f'grpc-google-cloud-{service}-{version}/src') + java.format_code(f'proto-google-cloud-{service}-{version}/src') - java.format_code('./src') - java.format_code(f'../../google-api-grpc/grpc-google-cloud-{service}-{version}/src') - java.format_code(f'../../google-api-grpc/proto-google-cloud-{service}-{version}/src') +common_templates = gcp.CommonTemplates() +templates = common_templates.java_library() +s.copy(templates, excludes=[ + 'README.md', +]) diff --git a/target/checkstyle-result.xml b/target/checkstyle-result.xml index e69de29b..3c8690bc 100644 --- a/target/checkstyle-result.xml +++ b/target/checkstyle-result.xml @@ -0,0 +1,3 @@ + + +