From f20a4a27ddd057950b4a9dc4e1dbe3a478606132 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Sep 2020 08:10:07 +0000 Subject: [PATCH 01/54] chore: release 1.0.13-SNAPSHOT (#376) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- google-cloud-bigquerydatatransfer-bom/pom.xml | 8 ++++---- google-cloud-bigquerydatatransfer/pom.xml | 4 ++-- grpc-google-cloud-bigquerydatatransfer-v1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-bigquerydatatransfer-v1/pom.xml | 4 ++-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/google-cloud-bigquerydatatransfer-bom/pom.xml b/google-cloud-bigquerydatatransfer-bom/pom.xml index 84643a04..47281f05 100644 --- a/google-cloud-bigquerydatatransfer-bom/pom.xml +++ b/google-cloud-bigquerydatatransfer-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigquerydatatransfer-bom - 1.0.12 + 1.0.13-SNAPSHOT pom com.google.cloud @@ -64,17 +64,17 @@ com.google.cloud google-cloud-bigquerydatatransfer - 1.0.12 + 1.0.13-SNAPSHOT com.google.api.grpc proto-google-cloud-bigquerydatatransfer-v1 - 1.0.12 + 1.0.13-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigquerydatatransfer-v1 - 1.0.12 + 1.0.13-SNAPSHOT diff --git a/google-cloud-bigquerydatatransfer/pom.xml b/google-cloud-bigquerydatatransfer/pom.xml index 8d9c45ea..a4777370 100644 --- a/google-cloud-bigquerydatatransfer/pom.xml +++ b/google-cloud-bigquerydatatransfer/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigquerydatatransfer - 1.0.12 + 1.0.13-SNAPSHOT jar BigQuery DataTransfer https://github.com/googleapis/java-bigquerydatatransfer @@ -11,7 +11,7 @@ com.google.cloud google-cloud-bigquerydatatransfer-parent - 1.0.12 + 1.0.13-SNAPSHOT google-cloud-bigquerydatatransfer diff --git a/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml b/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml index d04c6a82..092d8d34 100644 --- a/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml +++ b/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigquerydatatransfer-v1 - 1.0.12 + 1.0.13-SNAPSHOT grpc-google-cloud-bigquerydatatransfer-v1 GRPC library for grpc-google-cloud-bigquerydatatransfer-v1 com.google.cloud google-cloud-bigquerydatatransfer-parent - 1.0.12 + 1.0.13-SNAPSHOT diff --git a/pom.xml b/pom.xml index e3cc9eb7..a127c55f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigquerydatatransfer-parent pom - 1.0.12 + 1.0.13-SNAPSHOT BigQuery DataTransfer Parent https://github.com/googleapis/java-bigquerydatatransfer @@ -77,17 +77,17 @@ com.google.api.grpc proto-google-cloud-bigquerydatatransfer-v1 - 1.0.12 + 1.0.13-SNAPSHOT com.google.api.grpc grpc-google-cloud-bigquerydatatransfer-v1 - 1.0.12 + 1.0.13-SNAPSHOT com.google.cloud google-cloud-bigquerydatatransfer - 1.0.12 + 1.0.13-SNAPSHOT diff --git a/proto-google-cloud-bigquerydatatransfer-v1/pom.xml b/proto-google-cloud-bigquerydatatransfer-v1/pom.xml index 1b16a42e..b3caa453 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/pom.xml +++ b/proto-google-cloud-bigquerydatatransfer-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigquerydatatransfer-v1 - 1.0.12 + 1.0.13-SNAPSHOT proto-google-cloud-bigquerydatatransfer-v1 PROTO library for proto-google-cloud-bigquerydatatransfer-v1 com.google.cloud google-cloud-bigquerydatatransfer-parent - 1.0.12 + 1.0.13-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 43bc6358..98d8d381 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-bigquerydatatransfer - 1.0.12 + 1.0.13-SNAPSHOT diff --git a/versions.txt b/versions.txt index eb7e7180..fcea00dc 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -proto-google-cloud-bigquerydatatransfer-v1:1.0.12:1.0.12 -grpc-google-cloud-bigquerydatatransfer-v1:1.0.12:1.0.12 -google-cloud-bigquerydatatransfer:1.0.12:1.0.12 +proto-google-cloud-bigquerydatatransfer-v1:1.0.12:1.0.13-SNAPSHOT +grpc-google-cloud-bigquerydatatransfer-v1:1.0.12:1.0.13-SNAPSHOT +google-cloud-bigquerydatatransfer:1.0.12:1.0.13-SNAPSHOT From 19b42c5951fadd1e6f13e4d7d943423f5b827bec Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 24 Sep 2020 08:44:33 -0700 Subject: [PATCH 02/54] chore: update readme (#372) autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- README.md | 4 ++-- synth.metadata | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7a90cdf4..d0b295fc 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,11 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-bigquerydatatransfer:1.0.12' +compile 'com.google.cloud:google-cloud-bigquerydatatransfer:1.0.11' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer" % "1.0.12" +libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer" % "1.0.11" ``` [//]: # ({x-version-update-end}) diff --git a/synth.metadata b/synth.metadata index d3650184..0ab36b81 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,7 +11,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "08f0a9758c17e016080f4729bfad34b447d7cae7" + "sha": "24e282b6038f5c71e78b29015a2bf0b925d402c8" } }, { From 55b15824a5f446537af5e7697d1c5adfc955c9ce Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 24 Sep 2020 08:56:25 -0700 Subject: [PATCH 03/54] chore: regen common template (#373) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * build(java): use yoshi-approver token for auto-approve Source-Author: Jeff Ching Source-Date: Wed Sep 23 12:46:45 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 916c10e8581804df2b48a0f0457d848f3faa582e Source-Link: https://github.com/googleapis/synthtool/commit/916c10e8581804df2b48a0f0457d848f3faa582e --- .github/workflows/auto-release.yaml | 4 ++-- synth.metadata | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index d26427e4..c8494910 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -7,7 +7,7 @@ jobs: steps: - uses: actions/github-script@v3.0.0 with: - github-token: ${{secrets.GITHUB_TOKEN}} + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true script: | // only approve PRs from release-please[bot] @@ -66,4 +66,4 @@ jobs: repo: context.repo.repo, issue_number: context.payload.pull_request.number, labels: ['kokoro:force-run', 'automerge'] - }); \ No newline at end of file + }); diff --git a/synth.metadata b/synth.metadata index 0ab36b81..45257c4f 100644 --- a/synth.metadata +++ b/synth.metadata @@ -26,7 +26,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "80003a3de2d8a75f5b47cb2e77e018f7f0f776cc" + "sha": "916c10e8581804df2b48a0f0457d848f3faa582e" } } ], From 14a2c2caf0759517d27d14f94118454b4284b46b Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 24 Sep 2020 08:57:06 -0700 Subject: [PATCH 04/54] chore: add repo settings configuration (#374) --- .github/sync-repo-settings.yaml | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/sync-repo-settings.yaml diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml new file mode 100644 index 00000000..6bddd18e --- /dev/null +++ b/.github/sync-repo-settings.yaml @@ -0,0 +1,49 @@ + +# Whether or not rebase-merging is enabled on this repository. +# Defaults to `true` +rebaseMergeAllowed: false + +# Whether or not squash-merging is enabled on this repository. +# Defaults to `true` +squashMergeAllowed: true + +# Whether or not PRs are merged with a merge commit on this repository. +# Defaults to `false` +mergeCommitAllowed: false + +# Rules for master branch protection +branchProtectionRules: +# Identifies the protection rule pattern. Name of the branch to be protected. +# Defaults to `master` +- pattern: master + # Can admins overwrite branch protection. + # Defaults to `true` + isAdminEnforced: true + # Number of approving reviews required to update matching branches. + # Defaults to `1` + requiredApprovingReviewCount: 1 + # Are reviews from code owners required to update matching branches. + # Defaults to `false` + requiresCodeOwnerReviews: true + # Require up to date branches + requiresStrictStatusChecks: false + # List of required status check contexts that must pass for commits to be accepted to matching branches. + requiredStatusCheckContexts: + - "dependencies (8)" + - "dependencies (11)" + - "linkage-monitor" + - "lint" + - "clirr" + - "units (7)" + - "units (8)" + - "units (11)" + - "Kokoro - Test: Integration" + - "cla/google" +# List of explicit permissions to add (additive only) +permissionRules: +- team: yoshi-admins + permission: admin +- team: yoshi-java-admins + permission: admin +- team: yoshi-java + permission: push \ No newline at end of file From b579be9a71070ff54faa35b4556e20c3cab5ac3a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 24 Sep 2020 17:57:33 +0200 Subject: [PATCH 05/54] chore(deps): update dependency com.google.cloud:google-cloud-bigquerydatatransfer to v1.0.12 (#375) --- samples/install-without-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index ae687104..25236ce7 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-bigquerydatatransfer - 1.0.11 + 1.0.12 From 699c6d50ab65a6105df73cc9a9385a7f1308e826 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 24 Sep 2020 20:57:10 +0200 Subject: [PATCH 06/54] chore(deps): update dependency com.google.cloud:libraries-bom to v11 --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 3e418151..c7fefff5 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 10.1.0 + 11.0.0 pom import From 8553c4812278169e8f65c115123af28d0317db44 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 25 Sep 2020 09:08:37 -0700 Subject: [PATCH 07/54] chore: regen common templates (#379) autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- README.md | 8 ++++---- synth.metadata | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d0b295fc..85ece84b 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 10.1.0 + 11.0.0 pom import @@ -38,7 +38,7 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-bigquerydatatransfer - 1.0.11 + 1.0.12 ``` @@ -47,11 +47,11 @@ If you are using Maven without BOM, add this to your dependencies: If you are using Gradle, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-bigquerydatatransfer:1.0.11' +compile 'com.google.cloud:google-cloud-bigquerydatatransfer:1.0.12' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer" % "1.0.11" +libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer" % "1.0.12" ``` [//]: # ({x-version-update-end}) diff --git a/synth.metadata b/synth.metadata index 45257c4f..7d1329d8 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,7 +11,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "24e282b6038f5c71e78b29015a2bf0b925d402c8" + "sha": "699c6d50ab65a6105df73cc9a9385a7f1308e826" } }, { From ef8975fd9da7431b7a1646c2f7efbc2aa52ce4c5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 25 Sep 2020 09:10:00 -0700 Subject: [PATCH 08/54] chore: regen common templates (#380) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * chore(ci): skip autorelease workflow on non-release PRs Source-Author: Stephanie Wang Source-Date: Thu Sep 24 16:57:32 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 95dbe1bee3c7f7e52ddb24a54c37080620e0d1a2 Source-Link: https://github.com/googleapis/synthtool/commit/95dbe1bee3c7f7e52ddb24a54c37080620e0d1a2 --- .github/workflows/auto-release.yaml | 1 + synth.metadata | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index c8494910..3ce51eee 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -4,6 +4,7 @@ name: auto-release jobs: approve: runs-on: ubuntu-latest + if: contains(github.head_ref, 'release-v') steps: - uses: actions/github-script@v3.0.0 with: diff --git a/synth.metadata b/synth.metadata index 7d1329d8..2235ca73 100644 --- a/synth.metadata +++ b/synth.metadata @@ -26,7 +26,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "916c10e8581804df2b48a0f0457d848f3faa582e" + "sha": "95dbe1bee3c7f7e52ddb24a54c37080620e0d1a2" } } ], From 5eba40e70b7b583412da8d0998636ba4752a0154 Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Fri, 25 Sep 2020 21:41:00 +0530 Subject: [PATCH 09/54] refactor(samples): update transfer config (#381) --- .../UpdateTransferConfig.java | 17 +++++++++-------- .../UpdateTransferConfigIT.java | 11 ++++++++++- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateTransferConfig.java b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateTransferConfig.java index 7d45ed69..09e1f057 100644 --- a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateTransferConfig.java +++ b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateTransferConfig.java @@ -31,17 +31,18 @@ public class UpdateTransferConfig { public static void main(String[] args) throws IOException { // TODO(developer): Replace these variables before running the sample. String configId = "MY_CONFIG_ID"; - updateTransferConfig(configId); + TransferConfig transferConfig = + TransferConfig.newBuilder() + .setName(configId) + .setDisplayName("UPDATED_DISPLAY_NAME") + .build(); + FieldMask updateMask = FieldMaskUtil.fromString("display_name"); + updateTransferConfig(transferConfig, updateMask); } - public static void updateTransferConfig(String configId) throws IOException { + public static void updateTransferConfig(TransferConfig transferConfig, FieldMask updateMask) + throws IOException { try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { - TransferConfig transferConfig = - TransferConfig.newBuilder() - .setName(configId) - .setDisplayName("UPDATED_DISPLAY_NAME") - .build(); - FieldMask updateMask = FieldMaskUtil.fromString("display_name"); UpdateTransferConfigRequest request = UpdateTransferConfigRequest.newBuilder() .setTransferConfig(transferConfig) diff --git a/samples/snippets/src/test/java/com/example/bigquerydatatransfer/UpdateTransferConfigIT.java b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/UpdateTransferConfigIT.java index bbba090b..320c5ebe 100644 --- a/samples/snippets/src/test/java/com/example/bigquerydatatransfer/UpdateTransferConfigIT.java +++ b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/UpdateTransferConfigIT.java @@ -19,6 +19,9 @@ import static com.google.common.truth.Truth.assertThat; import static junit.framework.TestCase.assertNotNull; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; @@ -69,7 +72,13 @@ public void tearDown() { @Test public void testUpdateTransferConfig() throws IOException { - UpdateTransferConfig.updateTransferConfig(CONFIG_NAME); + TransferConfig transferConfig = + TransferConfig.newBuilder() + .setName(CONFIG_NAME) + .setDisplayName("UPDATED_DISPLAY_NAME") + .build(); + FieldMask updateMask = FieldMaskUtil.fromString("display_name"); + UpdateTransferConfig.updateTransferConfig(transferConfig, updateMask); assertThat(bout.toString()).contains("Transfer config updated successfully"); } } From bf883de93a59b7e29d5c11888330f19b788807ca Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 25 Sep 2020 17:36:07 -0700 Subject: [PATCH 10/54] chore(ci): verify autorelease release PR content has changes (#383) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/89edc375-a9b4-4f10-8e55-8b2c913e0f61/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/da29da32b3a988457b49ae290112b74f14b713cc --- .github/workflows/auto-release.yaml | 18 ++++++++++++++++++ synth.metadata | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 3ce51eee..bc1554ae 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -21,6 +21,24 @@ jobs: return; } + // only approve PRs with pom.xml and versions.txt changes + const filesPromise = github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const changed_files = await github.paginate(filesPromise) + + if ( changed_files.length < 1 ) { + console.log( "Not proceeding since PR is empty!" ) + return; + } + + if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { + console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) + return; + } + // trigger auto-release when // 1) it is a SNAPSHOT release (auto-generated post regular release) // 2) there are dependency updates only diff --git a/synth.metadata b/synth.metadata index 2235ca73..7f975de7 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,7 +11,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "699c6d50ab65a6105df73cc9a9385a7f1308e826" + "sha": "5eba40e70b7b583412da8d0998636ba4752a0154" } }, { @@ -26,7 +26,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "95dbe1bee3c7f7e52ddb24a54c37080620e0d1a2" + "sha": "da29da32b3a988457b49ae290112b74f14b713cc" } } ], From 533a68158dd92d083aba9e13493e4d66cd3d85df Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Mon, 28 Sep 2020 21:11:45 +0530 Subject: [PATCH 11/54] docs(samples): add disable transfer config (#384) * docs(samples): add disable transfer config * docs(samples): update test case name --- .../DisableTransferConfig.java | 55 +++++++++++++ .../DisableTransferConfigIT.java | 81 +++++++++++++++++++ .../UpdateTransferConfigIT.java | 2 +- 3 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 samples/snippets/src/main/java/com/example/bigquerydatatransfer/DisableTransferConfig.java create mode 100644 samples/snippets/src/test/java/com/example/bigquerydatatransfer/DisableTransferConfigIT.java diff --git a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DisableTransferConfig.java b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DisableTransferConfig.java new file mode 100644 index 00000000..5b88cee0 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DisableTransferConfig.java @@ -0,0 +1,55 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +// [START bigquerydatatransfer_disable_transfer] +import com.google.api.gax.rpc.ApiException; +import com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest; +import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; +import java.io.IOException; + +// Sample to disable transfer config. +public class DisableTransferConfig { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String configId = "MY_CONFIG_ID"; + TransferConfig transferConfig = + TransferConfig.newBuilder().setName(configId).setDisabled(true).build(); + FieldMask updateMask = FieldMaskUtil.fromString("disabled"); + disableTransferConfig(transferConfig, updateMask); + } + + public static void disableTransferConfig(TransferConfig transferConfig, FieldMask updateMask) + throws IOException { + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + UpdateTransferConfigRequest request = + UpdateTransferConfigRequest.newBuilder() + .setTransferConfig(transferConfig) + .setUpdateMask(updateMask) + .build(); + TransferConfig updateConfig = dataTransferServiceClient.updateTransferConfig(request); + System.out.println("Transfer config disabled successfully :" + updateConfig.getDisplayName()); + } catch (ApiException ex) { + System.out.print("Transfer config was not disabled." + ex.toString()); + } + } +} +// [END bigquerydatatransfer_disable_transfer] diff --git a/samples/snippets/src/test/java/com/example/bigquerydatatransfer/DisableTransferConfigIT.java b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/DisableTransferConfigIT.java new file mode 100644 index 00000000..5934d1e5 --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/DisableTransferConfigIT.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +package com.example.bigquerydatatransfer; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class DisableTransferConfigIT { + + private static final Logger LOG = Logger.getLogger(DisableTransferConfigIT.class.getName()); + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static final String CONFIG_NAME = requireEnvVar("DTS_TRANSFER_CONFIG_NAME"); + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("DTS_TRANSFER_CONFIG_NAME"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() { + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testDisableTransferConfig() throws IOException { + TransferConfig transferConfig = + TransferConfig.newBuilder().setName(CONFIG_NAME).setDisabled(true).build(); + FieldMask updateMask = FieldMaskUtil.fromString("disabled"); + DisableTransferConfig.disableTransferConfig(transferConfig, updateMask); + assertThat(bout.toString()).contains("Transfer config disabled successfully"); + } +} diff --git a/samples/snippets/src/test/java/com/example/bigquerydatatransfer/UpdateTransferConfigIT.java b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/UpdateTransferConfigIT.java index 320c5ebe..4da497a9 100644 --- a/samples/snippets/src/test/java/com/example/bigquerydatatransfer/UpdateTransferConfigIT.java +++ b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/UpdateTransferConfigIT.java @@ -34,7 +34,7 @@ public class UpdateTransferConfigIT { - private static final Logger LOG = Logger.getLogger(DeleteScheduledQueryIT.class.getName()); + private static final Logger LOG = Logger.getLogger(UpdateTransferConfigIT.class.getName()); private ByteArrayOutputStream bout; private PrintStream out; private PrintStream originalPrintStream; From 7d61025046c6172dbe8f1f52bd90324f9a5357c4 Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Mon, 28 Sep 2020 21:29:33 +0530 Subject: [PATCH 12/54] docs(samples): add re-enable transfer config (#385) --- .../ReEnableTransferConfig.java | 55 +++++++++++++ .../ReEnableTransferConfigIT.java | 81 +++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/bigquerydatatransfer/ReEnableTransferConfig.java create mode 100644 samples/snippets/src/test/java/com/example/bigquerydatatransfer/ReEnableTransferConfigIT.java diff --git a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/ReEnableTransferConfig.java b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/ReEnableTransferConfig.java new file mode 100644 index 00000000..64cca379 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/ReEnableTransferConfig.java @@ -0,0 +1,55 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +// [START bigquerydatatransfer_reenable_transfer] +import com.google.api.gax.rpc.ApiException; +import com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest; +import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; +import java.io.IOException; + +// Sample to re-enable transfer config. +public class ReEnableTransferConfig { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String configId = "MY_CONFIG_ID"; + TransferConfig transferConfig = + TransferConfig.newBuilder().setName(configId).setDisabled(false).build(); + FieldMask updateMask = FieldMaskUtil.fromString("disabled"); + reEnableTransferConfig(transferConfig, updateMask); + } + + public static void reEnableTransferConfig(TransferConfig transferConfig, FieldMask updateMask) + throws IOException { + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + UpdateTransferConfigRequest request = + UpdateTransferConfigRequest.newBuilder() + .setTransferConfig(transferConfig) + .setUpdateMask(updateMask) + .build(); + TransferConfig updateConfig = dataTransferServiceClient.updateTransferConfig(request); + System.out.println("Transfer config reenable successfully :" + updateConfig.getDisplayName()); + } catch (ApiException ex) { + System.out.print("Transfer config was not reenable." + ex.toString()); + } + } +} +// [END bigquerydatatransfer_reenable_transfer] diff --git a/samples/snippets/src/test/java/com/example/bigquerydatatransfer/ReEnableTransferConfigIT.java b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/ReEnableTransferConfigIT.java new file mode 100644 index 00000000..dcda4884 --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/ReEnableTransferConfigIT.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +package com.example.bigquerydatatransfer; + +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertNotNull; + +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class ReEnableTransferConfigIT { + + private static final Logger LOG = Logger.getLogger(ReEnableTransferConfigIT.class.getName()); + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static final String CONFIG_NAME = requireEnvVar("DTS_TRANSFER_CONFIG_NAME"); + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("DTS_TRANSFER_CONFIG_NAME"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() { + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testReEnableTransferConfig() throws IOException { + TransferConfig transferConfig = + TransferConfig.newBuilder().setName(CONFIG_NAME).setDisabled(false).build(); + FieldMask updateMask = FieldMaskUtil.fromString("disabled"); + ReEnableTransferConfig.reEnableTransferConfig(transferConfig, updateMask); + assertThat(bout.toString()).contains("Transfer config reenable successfully"); + } +} From cc1e59854264be3a2d45d3fb352bcd1f8bf23063 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 28 Sep 2020 21:56:37 -0700 Subject: [PATCH 13/54] chore: regen readme (#387) autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- README.md | 2 ++ synth.metadata | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 85ece84b..c04b7137 100644 --- a/README.md +++ b/README.md @@ -96,9 +96,11 @@ has instructions for running the samples. | Create Scheduled Query | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQuery.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQuery.java) | | Create Scheduled Query With Service Account | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQueryWithServiceAccount.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQueryWithServiceAccount.java) | | Delete Scheduled Query | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteScheduledQuery.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteScheduledQuery.java) | +| Disable Transfer Config | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DisableTransferConfig.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/DisableTransferConfig.java) | | Get Transfer Config Info | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/GetTransferConfigInfo.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/GetTransferConfigInfo.java) | | List Transfer Configs | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/ListTransferConfigs.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/ListTransferConfigs.java) | | Quickstart Sample | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/QuickstartSample.java) | +| Re Enable Transfer Config | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/ReEnableTransferConfig.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/ReEnableTransferConfig.java) | | Run Details | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunDetails.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunDetails.java) | | Run History | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunHistory.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunHistory.java) | | Run Notification | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunNotification.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunNotification.java) | diff --git a/synth.metadata b/synth.metadata index 7f975de7..2253a010 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,7 +11,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "5eba40e70b7b583412da8d0998636ba4752a0154" + "sha": "7d61025046c6172dbe8f1f52bd90324f9a5357c4" } }, { From 61ce27d43653ce5f2ae8647370240ec80148399e Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Tue, 29 Sep 2020 21:04:13 +0530 Subject: [PATCH 14/54] docs(samples): add delete transfer config (#388) * docs(samples): add delete transfer config * docs(samples): update contain --- .../DeleteTransferConfig.java | 47 +++++++ .../DeleteTransferConfigIT.java | 132 ++++++++++++++++++ 2 files changed, 179 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteTransferConfig.java create mode 100644 samples/snippets/src/test/java/com/example/bigquerydatatransfer/DeleteTransferConfigIT.java diff --git a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteTransferConfig.java b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteTransferConfig.java new file mode 100644 index 00000000..b878b253 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteTransferConfig.java @@ -0,0 +1,47 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +// [START bigquerydatatransfer_delete_transfer] +import com.google.api.gax.rpc.ApiException; +import com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient; +import com.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest; +import java.io.IOException; + +// Sample to delete a transfer config +public class DeleteTransferConfig { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + // i.e projects/{project_id}/transferConfigs/{config_id}` or + // `projects/{project_id}/locations/{location_id}/transferConfigs/{config_id}` + String configId = "MY_CONFIG_ID"; + deleteTransferConfig(configId); + } + + public static void deleteTransferConfig(String configId) throws IOException { + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + DeleteTransferConfigRequest request = + DeleteTransferConfigRequest.newBuilder().setName(configId).build(); + dataTransferServiceClient.deleteTransferConfig(request); + System.out.println("Transfer config deleted successfully"); + } catch (ApiException ex) { + System.out.println("Transfer config was not deleted." + ex.toString()); + } + } +} +// [END bigquerydatatransfer_delete_transfer] diff --git a/samples/snippets/src/test/java/com/example/bigquerydatatransfer/DeleteTransferConfigIT.java b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/DeleteTransferConfigIT.java new file mode 100644 index 00000000..33ad1135 --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/DeleteTransferConfigIT.java @@ -0,0 +1,132 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.BigQuery; +import com.google.cloud.bigquery.BigQueryOptions; +import com.google.cloud.bigquery.DatasetInfo; +import com.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient; +import com.google.cloud.bigquery.datatransfer.v1.ProjectName; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.protobuf.Struct; +import com.google.protobuf.Value; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class DeleteTransferConfigIT { + + private static final Logger LOG = Logger.getLogger(DeleteTransferConfigIT.class.getName()); + private BigQuery bigquery; + private ByteArrayOutputStream bout; + private String name; + private String displayName; + private String datasetName; + private PrintStream out; + private PrintStream originalPrintStream; + + private static final String PROJECT_ID = requireEnvVar("GOOGLE_CLOUD_PROJECT"); + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + } + + @Before + public void setUp() throws IOException { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + + displayName = "MY_SCHEDULE_NAME_TEST_" + UUID.randomUUID().toString().substring(0, 8); + datasetName = "MY_DATASET_NAME_TEST_" + UUID.randomUUID().toString().substring(0, 8); + // create a temporary dataset + bigquery = BigQueryOptions.getDefaultInstance().getService(); + bigquery.create(DatasetInfo.of(datasetName)); + + // create a scheduled query + String query = + "SELECT CURRENT_TIMESTAMP() as current_time, @run_time as intended_run_time, " + + "@run_date as intended_run_date, 17 as some_integer"; + String destinationTableName = + "MY_DESTINATION_TABLE_" + UUID.randomUUID().toString().substring(0, 8) + "_{run_date}"; + Map params = new HashMap<>(); + params.put("query", Value.newBuilder().setStringValue(query).build()); + params.put( + "destination_table_name_template", + Value.newBuilder().setStringValue(destinationTableName).build()); + params.put("write_disposition", Value.newBuilder().setStringValue("WRITE_TRUNCATE").build()); + params.put("partitioning_field", Value.newBuilder().setStringValue("").build()); + TransferConfig transferConfig = + TransferConfig.newBuilder() + .setDestinationDatasetId(datasetName) + .setDisplayName(displayName) + .setDataSourceId("scheduled_query") + .setParams(Struct.newBuilder().putAllFields(params).build()) + .setSchedule("every 24 hours") + .build(); + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ProjectName parent = ProjectName.of(PROJECT_ID); + CreateTransferConfigRequest request = + CreateTransferConfigRequest.newBuilder() + .setParent(parent.toString()) + .setTransferConfig(transferConfig) + .build(); + name = dataTransferServiceClient.createTransferConfig(request).getName(); + System.out.println("Transfer config created successfully :" + name); + } + } + + @After + public void tearDown() { + // delete a temporary dataset + bigquery.delete(datasetName, BigQuery.DatasetDeleteOption.deleteContents()); + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testDeleteTransferConfig() throws IOException { + // delete scheduled query that was just created + DeleteTransferConfig.deleteTransferConfig(name); + assertThat(bout.toString()).contains("Transfer config deleted successfully"); + } +} From aac585590b1308eaa1cb6a628709381d90008185 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 30 Sep 2020 09:12:16 -0700 Subject: [PATCH 15/54] chore(java): use separate autosynth job for README (#392) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/eb84dd73-4363-4c22-9f5e-0e8909f49079/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/e6168630be3e31eede633ba2c6f1cd64248dec1c --- .github/readme/synth.py | 19 ++++++++++++ .kokoro/continuous/readme.cfg | 55 +++++++++++++++++++++++++++++++++++ .kokoro/readme.sh | 36 +++++++++++++++++++++++ synth.metadata | 8 +++-- 4 files changed, 115 insertions(+), 3 deletions(-) create mode 100644 .github/readme/synth.py create mode 100644 .kokoro/continuous/readme.cfg create mode 100644 .kokoro/readme.sh diff --git a/.github/readme/synth.py b/.github/readme/synth.py new file mode 100644 index 00000000..7b48cc28 --- /dev/null +++ b/.github/readme/synth.py @@ -0,0 +1,19 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated the README for this library.""" + +from synthtool.languages import java + +java.custom_templates(["java_library/README.md"]) diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg new file mode 100644 index 00000000..f282bdc6 --- /dev/null +++ b/.kokoro/continuous/readme.cfg @@ -0,0 +1,55 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-bigquerydatatransfer/.kokoro/readme.sh" +} + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.log" + } +} + +# The github token is stored here. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + # TODO(theacodes): remove this after secrets have globally propagated + backend_type: FASTCONFIGPUSH + } + } +} + +# Common env vars for all repositories and builds. +env_vars: { + key: "GITHUB_USER" + value: "yoshi-automation" +} +env_vars: { + key: "GITHUB_EMAIL" + value: "yoshi-automation@google.com" +} diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh new file mode 100644 index 00000000..cc377ded --- /dev/null +++ b/.kokoro/readme.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +cd ${KOKORO_ARTIFACTS_DIR}/github/java-bigquerydatatransfer + +# Disable buffering, so that the logs stream through. +export PYTHONUNBUFFERED=1 + +# Kokoro exposes this as a file, but the scripts expect just a plain variable. +export GITHUB_TOKEN=$(cat ${KOKORO_KEYSTORE_DIR}/73713_yoshi-automation-github-key) + +# Setup git credentials +echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials +git config --global credential.helper 'store --file ~/.git-credentials' + +python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool +python3.6 -m autosynth.synth \ + --repository=googleapis/java-bigquerydatatransfer \ + --synth-file-name=.github/readme/synth.py \ + --metadata-path=.github/readme/synth.metadata \ + --pr-title="chore: regenerate README" \ + --branch-suffix="readme" \ No newline at end of file diff --git a/synth.metadata b/synth.metadata index 2253a010..0ca511cb 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,7 +11,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "7d61025046c6172dbe8f1f52bd90324f9a5357c4" + "sha": "61ce27d43653ce5f2ae8647370240ec80148399e" } }, { @@ -26,7 +26,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "da29da32b3a988457b49ae290112b74f14b713cc" + "sha": "e6168630be3e31eede633ba2c6f1cd64248dec1c" } } ], @@ -47,6 +47,7 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", + ".github/readme/synth.py", ".github/release-please.yml", ".github/trusted-contribution.yml", ".github/workflows/auto-release.yaml", @@ -58,6 +59,7 @@ ".kokoro/common.sh", ".kokoro/continuous/common.cfg", ".kokoro/continuous/java8.cfg", + ".kokoro/continuous/readme.cfg", ".kokoro/dependencies.sh", ".kokoro/linkage-monitor.sh", ".kokoro/nightly/common.cfg", @@ -79,6 +81,7 @@ ".kokoro/presubmit/java8.cfg", ".kokoro/presubmit/linkage-monitor.cfg", ".kokoro/presubmit/lint.cfg", + ".kokoro/readme.sh", ".kokoro/release/bump_snapshot.cfg", ".kokoro/release/common.cfg", ".kokoro/release/common.sh", @@ -96,7 +99,6 @@ "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE", - "README.md", "codecov.yaml", "google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClient.java", "google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceSettings.java", From 5ad1751ad1f24f8340396b3aedb328facbdea446 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 30 Sep 2020 20:26:53 +0200 Subject: [PATCH 16/54] chore(deps): update dependency com.google.cloud:libraries-bom to v11.1.0 (#393) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index c7fefff5..bb9468d8 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 11.0.0 + 11.1.0 pom import From 37097f8d1e7745007f39533dc9fcd8256ac2ce3f Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Wed, 30 Sep 2020 23:57:33 +0530 Subject: [PATCH 17/54] docs(samples): add copy dataset (#389) --- .../bigquerydatatransfer/CopyDataset.java | 70 +++++++++++ .../bigquerydatatransfer/CopyDatasetIT.java | 113 ++++++++++++++++++ 2 files changed, 183 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/bigquerydatatransfer/CopyDataset.java create mode 100644 samples/snippets/src/test/java/com/example/bigquerydatatransfer/CopyDatasetIT.java diff --git a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CopyDataset.java b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CopyDataset.java new file mode 100644 index 00000000..631befa3 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CopyDataset.java @@ -0,0 +1,70 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +// [START bigquerydatatransfer_copy_dataset] +import com.google.api.gax.rpc.ApiException; +import com.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient; +import com.google.cloud.bigquery.datatransfer.v1.ProjectName; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.protobuf.Struct; +import com.google.protobuf.Value; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +// Sample to copy dataset from another gcp project +public class CopyDataset { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + final String destinationProjectId = "MY_DESTINATION_PROJECT_ID"; + final String destinationDatasetId = "MY_DESTINATION_DATASET_ID"; + final String sourceProjectId = "MY_SOURCE_PROJECT_ID"; + final String sourceDatasetId = "MY_SOURCE_DATASET_ID"; + Map params = new HashMap<>(); + params.put("source_project_id", Value.newBuilder().setStringValue(sourceProjectId).build()); + params.put("source_dataset_id", Value.newBuilder().setStringValue(sourceDatasetId).build()); + TransferConfig transferConfig = + TransferConfig.newBuilder() + .setDestinationDatasetId(destinationDatasetId) + .setDisplayName("Your Dataset Copy Name") + .setDataSourceId("cross_region_copy") + .setParams(Struct.newBuilder().putAllFields(params).build()) + .setSchedule("every 24 hours") + .build(); + copyDataset(destinationProjectId, transferConfig); + } + + public static void copyDataset(String projectId, TransferConfig transferConfig) + throws IOException { + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + ProjectName parent = ProjectName.of(projectId); + CreateTransferConfigRequest request = + CreateTransferConfigRequest.newBuilder() + .setParent(parent.toString()) + .setTransferConfig(transferConfig) + .build(); + TransferConfig config = dataTransferServiceClient.createTransferConfig(request); + System.out.println("Copy dataset created successfully :" + config.getName()); + } catch (ApiException ex) { + System.out.print("Copy dataset was not created." + ex.toString()); + } + } +} +// [END bigquerydatatransfer_copy_dataset] diff --git a/samples/snippets/src/test/java/com/example/bigquerydatatransfer/CopyDatasetIT.java b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/CopyDatasetIT.java new file mode 100644 index 00000000..84f05fa3 --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/CopyDatasetIT.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.BigQuery; +import com.google.cloud.bigquery.BigQueryOptions; +import com.google.cloud.bigquery.DatasetInfo; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.protobuf.Struct; +import com.google.protobuf.Value; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CopyDatasetIT { + + private static final Logger LOG = Logger.getLogger(CopyDatasetIT.class.getName()); + private BigQuery bigquery; + private ByteArrayOutputStream bout; + private String name; + private String displayName; + private String datasetName; + private PrintStream out; + private PrintStream originalPrintStream; + + private static final String PROJECT_ID = requireEnvVar("GOOGLE_CLOUD_PROJECT"); + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + } + + @Before + public void setUp() { + displayName = "MY_COPY_DATASET_NAME_TEST_" + UUID.randomUUID().toString().substring(0, 8); + datasetName = "MY_DATASET_NAME_TEST_" + UUID.randomUUID().toString().substring(0, 8); + // create a temporary dataset + bigquery = BigQueryOptions.getDefaultInstance().getService(); + bigquery.create(DatasetInfo.of(datasetName)); + + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() throws IOException { + // TODO(pmakani) replace DeleteTransferConfig once PR merged. + // Clean up + DeleteScheduledQuery.deleteScheduledQuery(name); + // delete a temporary dataset + bigquery.delete(datasetName, BigQuery.DatasetDeleteOption.deleteContents()); + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testCopyDataset() throws IOException { + Map params = new HashMap<>(); + params.put( + "source_project_id", Value.newBuilder().setStringValue("bigquery-public-data").build()); + params.put("source_dataset_id", Value.newBuilder().setStringValue("usa_names").build()); + TransferConfig transferConfig = + TransferConfig.newBuilder() + .setDestinationDatasetId(datasetName) + .setDisplayName(displayName) + .setDataSourceId("cross_region_copy") + .setParams(Struct.newBuilder().putAllFields(params).build()) + .setSchedule("every 24 hours") + .build(); + CopyDataset.copyDataset(PROJECT_ID, transferConfig); + String result = bout.toString(); + name = result.substring(result.indexOf(":") + 1, result.length() - 1); + assertThat(result).contains("Copy dataset created successfully :"); + } +} From 96eb331fdf9d4862d9149bb84d6d2493218db2fc Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Wed, 30 Sep 2020 23:58:18 +0530 Subject: [PATCH 18/54] docs(samples): add schedule backfill (#390) --- .../ScheduleBackFill.java | 78 +++++++++++++ .../ScheduleBackFillIT.java | 103 ++++++++++++++++++ 2 files changed, 181 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/bigquerydatatransfer/ScheduleBackFill.java create mode 100644 samples/snippets/src/test/java/com/example/bigquerydatatransfer/ScheduleBackFillIT.java diff --git a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/ScheduleBackFill.java b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/ScheduleBackFill.java new file mode 100644 index 00000000..5a79d492 --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/ScheduleBackFill.java @@ -0,0 +1,78 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +// [START bigquerydatatransfer_schedule_backfill] +import com.google.api.gax.rpc.ApiException; +import com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient; +import com.google.cloud.bigquery.datatransfer.v1.ScheduleOptions; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest; +import com.google.common.collect.ImmutableList; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.protobuf.util.FieldMaskUtil; +import java.io.IOException; +import org.threeten.bp.Clock; +import org.threeten.bp.Instant; +import org.threeten.bp.temporal.ChronoUnit; + +// Sample to update schedule back fill for transfer config +public class ScheduleBackFill { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String configId = "MY_CONFIG_ID"; + Clock clock = Clock.systemDefaultZone(); + Instant instant = clock.instant(); + Timestamp startDate = + Timestamp.newBuilder() + .setSeconds(instant.getEpochSecond()) + .setNanos(instant.getNano()) + .build(); + Timestamp endDate = + Timestamp.newBuilder() + .setSeconds(instant.plus(10, ChronoUnit.DAYS).getEpochSecond()) + .setNanos(instant.plus(10, ChronoUnit.DAYS).getNano()) + .build(); + TransferConfig transferConfig = + TransferConfig.newBuilder() + .setName(configId) + .setScheduleOptions( + ScheduleOptions.newBuilder().setStartTime(startDate).setEndTime(endDate).build()) + .build(); + FieldMask updateMask = FieldMaskUtil.fromStringList(ImmutableList.of("start_time", "end_time")); + scheduleBackFill(transferConfig, updateMask); + } + + public static void scheduleBackFill(TransferConfig transferConfig, FieldMask updateMask) + throws IOException { + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + UpdateTransferConfigRequest request = + UpdateTransferConfigRequest.newBuilder() + .setTransferConfig(transferConfig) + .setUpdateMask(updateMask) + .build(); + TransferConfig updateConfig = dataTransferServiceClient.updateTransferConfig(request); + System.out.println( + "Schedule backfill updated successfully :" + updateConfig.getDisplayName()); + } catch (ApiException ex) { + System.out.print("Schedule backfill was not updated." + ex.toString()); + } + } +} +// [END bigquerydatatransfer_schedule_backfill] diff --git a/samples/snippets/src/test/java/com/example/bigquerydatatransfer/ScheduleBackFillIT.java b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/ScheduleBackFillIT.java new file mode 100644 index 00000000..aaf0403a --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/ScheduleBackFillIT.java @@ -0,0 +1,103 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.datatransfer.v1.ScheduleOptions; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.common.collect.ImmutableList; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.protobuf.util.FieldMaskUtil; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; +import org.threeten.bp.Clock; +import org.threeten.bp.Instant; +import org.threeten.bp.temporal.ChronoUnit; + +public class ScheduleBackFillIT { + + private static final Logger LOG = Logger.getLogger(ScheduleBackFillIT.class.getName()); + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static final String CONFIG_NAME = requireEnvVar("DTS_TRANSFER_CONFIG_NAME"); + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("DTS_TRANSFER_CONFIG_NAME"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() { + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testScheduleBackFill() throws IOException { + Clock clock = Clock.systemDefaultZone(); + Instant instant = clock.instant(); + Timestamp startDate = + Timestamp.newBuilder() + .setSeconds(instant.getEpochSecond()) + .setNanos(instant.getNano()) + .build(); + Timestamp endDate = + Timestamp.newBuilder() + .setSeconds(instant.plus(10, ChronoUnit.DAYS).getEpochSecond()) + .setNanos(instant.plus(10, ChronoUnit.DAYS).getNano()) + .build(); + TransferConfig transferConfig = + TransferConfig.newBuilder() + .setName(CONFIG_NAME) + .setScheduleOptions( + ScheduleOptions.newBuilder().setStartTime(startDate).setEndTime(endDate).build()) + .build(); + FieldMask updateMask = FieldMaskUtil.fromStringList(ImmutableList.of("start_time", "end_time")); + ScheduleBackFill.scheduleBackFill(transferConfig, updateMask); + assertThat(bout.toString()).contains("Schedule backfill updated successfully :"); + } +} From c0f257da9f3117e1e034ce3b3b4f6c39fb555b89 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 30 Sep 2020 16:56:28 -0700 Subject: [PATCH 19/54] build: rename samples lint workflow to checkstyle to disambiguate branch protection with unit lint (#394) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/107a98b5-a9c9-4567-bd84-56cf4d34e4d2/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/8a7a3021fe97aa0a3641db642fe2b767f1c8110f --- .github/workflows/samples.yaml | 2 +- synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index a1d50073..c46230a7 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -2,7 +2,7 @@ on: pull_request: name: samples jobs: - lint: + checkstyle: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/synth.metadata b/synth.metadata index 0ca511cb..8811c4c6 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,7 +11,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "61ce27d43653ce5f2ae8647370240ec80148399e" + "sha": "96eb331fdf9d4862d9149bb84d6d2493218db2fc" } }, { @@ -26,7 +26,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e6168630be3e31eede633ba2c6f1cd64248dec1c" + "sha": "8a7a3021fe97aa0a3641db642fe2b767f1c8110f" } } ], From 1bb532c992b06510cbb41188920023ff0c2589d8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 2 Oct 2020 18:11:41 +0200 Subject: [PATCH 20/54] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.21 (#399) --- samples/install-without-bom/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 25236ce7..ea00c235 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/pom.xml b/samples/pom.xml index 41ce1664..39cb2d90 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 98d8d381..1484e069 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index bb9468d8..9ee04ab6 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.18 + 1.0.21 From e0edcd7c1a7d22c158ea39ffcb4018dae181c6b0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 2 Oct 2020 18:11:59 +0200 Subject: [PATCH 21/54] deps: update dependency com.google.cloud:google-cloud-bigquery to v1.122.0 (#398) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index ea00c235..5bbbe599 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -54,7 +54,7 @@ com.google.cloud google-cloud-bigquery - 1.120.0 + 1.122.0 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 1484e069..62b52309 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -53,7 +53,7 @@ com.google.cloud google-cloud-bigquery - 1.120.0 + 1.122.0 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 9ee04ab6..e2001cae 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -65,7 +65,7 @@ com.google.cloud google-cloud-bigquery - 1.120.0 + 1.122.0 test From 78e055e61ead073bda37289043c350b93c8ace50 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 5 Oct 2020 18:27:30 +0200 Subject: [PATCH 22/54] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.108.3 (#407) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 5bbbe599..5c8f8170 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -60,7 +60,7 @@ com.google.cloud google-cloud-pubsub - 1.108.1 + 1.108.3 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 62b52309..b9958cf0 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -59,7 +59,7 @@ com.google.cloud google-cloud-pubsub - 1.108.1 + 1.108.3 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index e2001cae..544e8833 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -71,7 +71,7 @@ com.google.cloud google-cloud-pubsub - 1.108.1 + 1.108.3 test From 7e06a6df9104abc7f60e1b4e56d11d00f8cab0dd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Oct 2020 22:08:36 +0200 Subject: [PATCH 23/54] chore(deps): update dependency com.google.cloud:libraries-bom to v12 (#409) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `11.1.0` -> `12.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquerydatatransfer). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 544e8833..9d587b6e 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 11.1.0 + 12.0.0 pom import From 41fb285d233d9598e7b54e49b4a67b0c49bb4af3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Oct 2020 22:21:36 +0200 Subject: [PATCH 24/54] deps: update dependency com.google.cloud:google-cloud-bigquery to v1.122.1 (#411) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 5c8f8170..bc87645a 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -54,7 +54,7 @@ com.google.cloud google-cloud-bigquery - 1.122.0 + 1.122.1 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index b9958cf0..4b04cc72 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -53,7 +53,7 @@ com.google.cloud google-cloud-bigquery - 1.122.0 + 1.122.1 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 9d587b6e..50e714bb 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -65,7 +65,7 @@ com.google.cloud google-cloud-bigquery - 1.122.0 + 1.122.1 test From 0344c1e844de6c82a48a8de0b4afcc188cbda1c5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Oct 2020 22:21:52 +0200 Subject: [PATCH 25/54] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.1 (#412) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a127c55f..56deb3c7 100644 --- a/pom.xml +++ b/pom.xml @@ -70,7 +70,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.10.0 + 0.10.1 pom import From 27d29f187b87dbf63c53f105044b23373b514ef7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 6 Oct 2020 15:16:02 -0700 Subject: [PATCH 26/54] build(java): readme.sh should be executable (#413) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1577a69f-b958-44c5-b4b6-e43d046b326e/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/0762e8ee2ec21cdfc4d82020b985a104feb0453b --- .kokoro/readme.sh | 0 synth.metadata | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 .kokoro/readme.sh diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh old mode 100644 new mode 100755 diff --git a/synth.metadata b/synth.metadata index 8811c4c6..5f714e57 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,7 +11,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "96eb331fdf9d4862d9149bb84d6d2493218db2fc" + "sha": "0344c1e844de6c82a48a8de0b4afcc188cbda1c5" } }, { @@ -26,7 +26,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8a7a3021fe97aa0a3641db642fe2b767f1c8110f" + "sha": "0762e8ee2ec21cdfc4d82020b985a104feb0453b" } } ], From b8e0e9e28b266c38b3ba86a5820e4c1606a85093 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 7 Oct 2020 08:39:10 -0700 Subject: [PATCH 27/54] chore: regenerate README (#414) --- .github/readme/synth.metadata/synth.metadata | 18 ++++++++++++++++++ README.md | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .github/readme/synth.metadata/synth.metadata diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata new file mode 100644 index 00000000..5d864a53 --- /dev/null +++ b/.github/readme/synth.metadata/synth.metadata @@ -0,0 +1,18 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", + "sha": "27d29f187b87dbf63c53f105044b23373b514ef7" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "487eba79f8260e34205d8ceb1ebcc65685085e19" + } + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index c04b7137..2d2ceefc 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 11.0.0 + 12.0.0 pom import @@ -93,9 +93,11 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Copy Dataset | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CopyDataset.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CopyDataset.java) | | Create Scheduled Query | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQuery.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQuery.java) | | Create Scheduled Query With Service Account | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQueryWithServiceAccount.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQueryWithServiceAccount.java) | | Delete Scheduled Query | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteScheduledQuery.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteScheduledQuery.java) | +| Delete Transfer Config | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteTransferConfig.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteTransferConfig.java) | | Disable Transfer Config | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DisableTransferConfig.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/DisableTransferConfig.java) | | Get Transfer Config Info | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/GetTransferConfigInfo.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/GetTransferConfigInfo.java) | | List Transfer Configs | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/ListTransferConfigs.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/ListTransferConfigs.java) | @@ -104,6 +106,7 @@ has instructions for running the samples. | Run Details | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunDetails.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunDetails.java) | | Run History | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunHistory.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunHistory.java) | | Run Notification | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunNotification.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunNotification.java) | +| Schedule Back Fill | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/ScheduleBackFill.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/ScheduleBackFill.java) | | Update Transfer Config | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateTransferConfig.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateTransferConfig.java) | From 4eb4530c54704eaf5418331746b84e5a895bf930 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 8 Oct 2020 19:02:37 +0200 Subject: [PATCH 28/54] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 (#415) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | patch | `0.10.1` -> `0.10.2` | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v0.10.2`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​0102-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare0101v0102-2020-10-08) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v0.10.1...v0.10.2)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquerydatatransfer). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 56deb3c7..b4dbac26 100644 --- a/pom.xml +++ b/pom.xml @@ -70,7 +70,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.10.1 + 0.10.2 pom import From 52ac0a029c1f47c5cdd9268e320a48ce80f7c212 Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Fri, 9 Oct 2020 21:09:30 +0530 Subject: [PATCH 29/54] docs(samples): add create amazon s3 transfer (#416) --- .../CreateAmazonS3Transfer.java | 83 ++++++++++ .../CreateAmazonS3TransferIT.java | 148 ++++++++++++++++++ 2 files changed, 231 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateAmazonS3Transfer.java create mode 100644 samples/snippets/src/test/java/com/example/bigquerydatatransfer/CreateAmazonS3TransferIT.java diff --git a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateAmazonS3Transfer.java b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateAmazonS3Transfer.java new file mode 100644 index 00000000..c0f2356a --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateAmazonS3Transfer.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +// [START bigquerydatatransfer_create_amazons3_transfer] +import com.google.api.gax.rpc.ApiException; +import com.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient; +import com.google.cloud.bigquery.datatransfer.v1.ProjectName; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.protobuf.Struct; +import com.google.protobuf.Value; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +// Sample to create amazon s3 transfer config. +public class CreateAmazonS3Transfer { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + final String projectId = "MY_PROJECT_ID"; + String datasetId = "MY_DATASET_ID"; + String tableId = "MY_TABLE_ID"; + // Amazon S3 Bucket Uri with read role permission + String sourceUri = "s3://your-bucket-name/*"; + String awsAccessKeyId = "MY_AWS_ACCESS_KEY_ID"; + String awsSecretAccessId = "AWS_SECRET_ACCESS_ID"; + String sourceFormat = "CSV"; + String fieldDelimiter = ","; + String skipLeadingRows = "1"; + Map params = new HashMap<>(); + params.put( + "destination_table_name_template", Value.newBuilder().setStringValue(tableId).build()); + params.put("data_path", Value.newBuilder().setStringValue(sourceUri).build()); + params.put("access_key_id", Value.newBuilder().setStringValue(awsAccessKeyId).build()); + params.put("secret_access_key", Value.newBuilder().setStringValue(awsSecretAccessId).build()); + params.put("source_format", Value.newBuilder().setStringValue(sourceFormat).build()); + params.put("field_delimiter", Value.newBuilder().setStringValue(fieldDelimiter).build()); + params.put("skip_leading_rows", Value.newBuilder().setStringValue(skipLeadingRows).build()); + TransferConfig transferConfig = + TransferConfig.newBuilder() + .setDestinationDatasetId(datasetId) + .setDisplayName("Your Aws S3 Config Name") + .setDataSourceId("amazon_s3") + .setParams(Struct.newBuilder().putAllFields(params).build()) + .setSchedule("every 24 hours") + .build(); + createAmazonS3Transfer(projectId, transferConfig); + } + + public static void createAmazonS3Transfer(String projectId, TransferConfig transferConfig) + throws IOException { + try (DataTransferServiceClient client = DataTransferServiceClient.create()) { + ProjectName parent = ProjectName.of(projectId); + CreateTransferConfigRequest request = + CreateTransferConfigRequest.newBuilder() + .setParent(parent.toString()) + .setTransferConfig(transferConfig) + .build(); + TransferConfig config = client.createTransferConfig(request); + System.out.println("Amazon s3 transfer created successfully :" + config.getName()); + } catch (ApiException ex) { + System.out.print("Amazon s3 transfer was not created." + ex.toString()); + } + ; + } +} +// [END bigquerydatatransfer_create_amazons3_transfer] diff --git a/samples/snippets/src/test/java/com/example/bigquerydatatransfer/CreateAmazonS3TransferIT.java b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/CreateAmazonS3TransferIT.java new file mode 100644 index 00000000..7d037daf --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/CreateAmazonS3TransferIT.java @@ -0,0 +1,148 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.BigQuery; +import com.google.cloud.bigquery.BigQueryOptions; +import com.google.cloud.bigquery.DatasetInfo; +import com.google.cloud.bigquery.Field; +import com.google.cloud.bigquery.Schema; +import com.google.cloud.bigquery.StandardSQLTypeName; +import com.google.cloud.bigquery.StandardTableDefinition; +import com.google.cloud.bigquery.TableDefinition; +import com.google.cloud.bigquery.TableId; +import com.google.cloud.bigquery.TableInfo; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.protobuf.Struct; +import com.google.protobuf.Value; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateAmazonS3TransferIT { + + private static final Logger LOG = Logger.getLogger(CreateAmazonS3TransferIT.class.getName()); + private static final String ID = UUID.randomUUID().toString().substring(0, 8); + private BigQuery bigquery; + private ByteArrayOutputStream bout; + private String name; + private String displayName; + private String datasetName; + private String tableName; + private PrintStream out; + private PrintStream originalPrintStream; + + private static final String PROJECT_ID = requireEnvVar("GOOGLE_CLOUD_PROJECT"); + private static final String AWS_ACCESS_KEY_ID = requireEnvVar("AWS_ACCESS_KEY_ID"); + private static final String AWS_SECRET_ACCESS_KEY = requireEnvVar("AWS_SECRET_ACCESS_KEY"); + private static final String AWS_BUCKET = requireEnvVar("AWS_BUCKET"); + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + requireEnvVar("AWS_ACCESS_KEY_ID"); + requireEnvVar("AWS_SECRET_ACCESS_KEY"); + requireEnvVar("AWS_BUCKET"); + } + + @Before + public void setUp() { + displayName = "MY_SCHEDULE_NAME_TEST_" + ID; + datasetName = "MY_DATASET_NAME_TEST_" + ID; + tableName = "MY_TABLE_NAME_TEST_" + ID; + // create a temporary dataset + bigquery = BigQueryOptions.getDefaultInstance().getService(); + bigquery.create(DatasetInfo.of(datasetName)); + // create a temporary table + Schema schema = + Schema.of( + Field.of("name", StandardSQLTypeName.STRING), + Field.of("post_abbr", StandardSQLTypeName.STRING)); + TableDefinition tableDefinition = StandardTableDefinition.of(schema); + TableInfo tableInfo = TableInfo.of(TableId.of(datasetName, tableName), tableDefinition); + bigquery.create(tableInfo); + + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() throws IOException { + // Clean up + DeleteScheduledQuery.deleteScheduledQuery(name); + // delete a temporary table + bigquery.delete(TableId.of(datasetName, tableName)); + // delete a temporary dataset + bigquery.delete(datasetName, BigQuery.DatasetDeleteOption.deleteContents()); + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testCreateAmazonS3Transfer() throws IOException { + String sourceUri = String.format("s3://%s/*", AWS_BUCKET); + String fileFormat = "CSV"; + String fieldDelimiter = ","; + String skipLeadingRows = "1"; + Map params = new HashMap<>(); + params.put( + "destination_table_name_template", Value.newBuilder().setStringValue(tableName).build()); + params.put("data_path", Value.newBuilder().setStringValue(sourceUri).build()); + params.put("access_key_id", Value.newBuilder().setStringValue(AWS_ACCESS_KEY_ID).build()); + params.put( + "secret_access_key", Value.newBuilder().setStringValue(AWS_SECRET_ACCESS_KEY).build()); + params.put("file_format", Value.newBuilder().setStringValue(fileFormat).build()); + params.put("field_delimiter", Value.newBuilder().setStringValue(fieldDelimiter).build()); + params.put("skip_leading_rows", Value.newBuilder().setStringValue(skipLeadingRows).build()); + TransferConfig transferConfig = + TransferConfig.newBuilder() + .setDestinationDatasetId(datasetName) + .setDisplayName(displayName) + .setDataSourceId("amazon_s3") + .setParams(Struct.newBuilder().putAllFields(params).build()) + .setSchedule("every 24 hours") + .build(); + CreateAmazonS3Transfer.createAmazonS3Transfer(PROJECT_ID, transferConfig); + String result = bout.toString(); + name = result.substring(result.indexOf(":") + 1, result.length() - 1); + assertThat(result).contains("Amazon s3 transfer created successfully :"); + } +} From 157be7d6e904971bd6e6afbabe247087cbf34bae Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 9 Oct 2020 09:02:41 -0700 Subject: [PATCH 30/54] chore: regen readme (#417) autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. --- .github/readme/synth.metadata/synth.metadata | 2 +- README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 5d864a53..8272feb0 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "27d29f187b87dbf63c53f105044b23373b514ef7" + "sha": "52ac0a029c1f47c5cdd9268e320a48ce80f7c212" } }, { diff --git a/README.md b/README.md index 2d2ceefc..eeab8e24 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,7 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | | Copy Dataset | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CopyDataset.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CopyDataset.java) | +| Create Amazon S3 Transfer | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateAmazonS3Transfer.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateAmazonS3Transfer.java) | | Create Scheduled Query | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQuery.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQuery.java) | | Create Scheduled Query With Service Account | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQueryWithServiceAccount.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQueryWithServiceAccount.java) | | Delete Scheduled Query | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteScheduledQuery.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteScheduledQuery.java) | From ad92b1af71bbf747da57aae011f47bc5d7f07c27 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Oct 2020 22:16:02 +0200 Subject: [PATCH 31/54] deps: update dependency com.google.cloud:google-cloud-bigquery to v1.122.2 (#418) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-bigquery](https://togithub.com/googleapis/java-bigquery) | patch | `1.122.1` -> `1.122.2` | --- ### Release Notes
googleapis/java-bigquery ### [`v1.122.2`](https://togithub.com/googleapis/java-bigquery/blob/master/CHANGELOG.md#​11222-httpswwwgithubcomgoogleapisjava-bigquerycomparev11221v11222-2020-10-08) [Compare Source](https://togithub.com/googleapis/java-bigquery/compare/v1.122.1...v1.122.2)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquerydatatransfer). --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index bc87645a..77b6be43 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -54,7 +54,7 @@ com.google.cloud google-cloud-bigquery - 1.122.1 + 1.122.2 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 4b04cc72..545239d9 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -53,7 +53,7 @@ com.google.cloud google-cloud-bigquery - 1.122.1 + 1.122.2 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 50e714bb..1a9627c9 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -65,7 +65,7 @@ com.google.cloud google-cloud-bigquery - 1.122.1 + 1.122.2 test From 310122bb335e8f716d12890c8e06397e1b997ac3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 11 Oct 2020 23:21:27 +0200 Subject: [PATCH 32/54] deps: update dependency junit:junit to v4.13.1 (#421) --- pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index b4dbac26..02adf40e 100644 --- a/pom.xml +++ b/pom.xml @@ -94,7 +94,7 @@ junit junit - 4.13 + 4.13.1 test diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 77b6be43..9c1b76d2 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -42,7 +42,7 @@ junit junit - 4.13 + 4.13.1 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 545239d9..37a0b9cf 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -41,7 +41,7 @@ junit junit - 4.13 + 4.13.1 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 1a9627c9..923445d1 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -53,7 +53,7 @@ junit junit - 4.13 + 4.13.1 test From 963c20761b54695f4a322cce27726f804a07a7b4 Mon Sep 17 00:00:00 2001 From: Stephanie Wang Date: Mon, 12 Oct 2020 15:36:04 -0400 Subject: [PATCH 33/54] ci: restrict presubmit samples ITs to only snapshot (#422) to address incessant quota issues --- .kokoro/build.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 77c73321..f48f3687 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -69,14 +69,21 @@ integration) RETURN_CODE=$? ;; samples) - if [[ -f samples/pom.xml ]] + SAMPLES_DIR=samples + # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. + if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]] + then + SAMPLES_DIR=samples/snapshot + fi + + if [[ -f ${SAMPLES_DIR}/pom.xml ]] then if [ -f "${KOKORO_GFILE_DIR}/secret_manager/java-bigquerydatatransfer-samples-secrets" ] then source "${KOKORO_GFILE_DIR}/secret_manager/java-bigquerydatatransfer-samples-secrets" fi - pushd samples + pushd ${SAMPLES_DIR} mvn -B \ -Penable-samples \ -DtrimStackTrace=false \ From 18073427ef4c0103949f6f7285c8869e08ff8205 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 12 Oct 2020 21:38:21 +0200 Subject: [PATCH 34/54] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.108.4 (#423) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 9c1b76d2..c51d8ac4 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -60,7 +60,7 @@ com.google.cloud google-cloud-pubsub - 1.108.3 + 1.108.4 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 37a0b9cf..fd2a68fd 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -59,7 +59,7 @@ com.google.cloud google-cloud-pubsub - 1.108.3 + 1.108.4 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 923445d1..f0e29864 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -71,7 +71,7 @@ com.google.cloud google-cloud-pubsub - 1.108.3 + 1.108.4 test From 16022eaa8f93b497fb569fe5be5ed996993adf02 Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Tue, 13 Oct 2020 21:19:00 +0530 Subject: [PATCH 35/54] docs(samples): add update credentials (#425) --- .../UpdateCredentials.java | 57 +++++++++++++ .../UpdateCredentialsIT.java | 82 +++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateCredentials.java create mode 100644 samples/snippets/src/test/java/com/example/bigquerydatatransfer/UpdateCredentialsIT.java diff --git a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateCredentials.java b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateCredentials.java new file mode 100644 index 00000000..ccdbde3b --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateCredentials.java @@ -0,0 +1,57 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +// [START bigquerydatatransfer_update_credentials] +import com.google.api.gax.rpc.ApiException; +import com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest; +import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; +import java.io.IOException; + +// Sample to update credentials in transfer config. +public class UpdateCredentials { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + String configId = "MY_CONFIG_ID"; + String serviceAccount = "MY_SERVICE_ACCOUNT"; + TransferConfig transferConfig = TransferConfig.newBuilder().setName(configId).build(); + FieldMask updateMask = FieldMaskUtil.fromString("service_account_name"); + updateCredentials(transferConfig, serviceAccount, updateMask); + } + + public static void updateCredentials( + TransferConfig transferConfig, String serviceAccount, FieldMask updateMask) + throws IOException { + try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) { + UpdateTransferConfigRequest request = + UpdateTransferConfigRequest.newBuilder() + .setTransferConfig(transferConfig) + .setUpdateMask(updateMask) + .setServiceAccountName(serviceAccount) + .build(); + dataTransferServiceClient.updateTransferConfig(request); + System.out.println("Credentials updated successfully"); + } catch (ApiException ex) { + System.out.print("Credentials was not updated." + ex.toString()); + } + } +} +// [END bigquerydatatransfer_update_credentials] diff --git a/samples/snippets/src/test/java/com/example/bigquerydatatransfer/UpdateCredentialsIT.java b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/UpdateCredentialsIT.java new file mode 100644 index 00000000..a4ab53ca --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/UpdateCredentialsIT.java @@ -0,0 +1,82 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.protobuf.FieldMask; +import com.google.protobuf.util.FieldMaskUtil; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class UpdateCredentialsIT { + + private static final Logger LOG = Logger.getLogger(UpdateCredentialsIT.class.getName()); + private ByteArrayOutputStream bout; + private PrintStream out; + private PrintStream originalPrintStream; + + private static final String CONFIG_NAME = requireEnvVar("DTS_TRANSFER_CONFIG_NAME"); + private static final String SERVICE_ACCOUNT = requireEnvVar("DTS_UPDATED_SERVICE_ACCOUNT"); + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("DTS_TRANSFER_CONFIG_NAME"); + requireEnvVar("DTS_UPDATED_SERVICE_ACCOUNT"); + } + + @Before + public void setUp() { + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() { + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testUpdateCredentials() throws IOException { + TransferConfig transferConfig = TransferConfig.newBuilder().setName(CONFIG_NAME).build(); + FieldMask updateMask = FieldMaskUtil.fromString("service_account_name"); + UpdateCredentials.updateCredentials(transferConfig, SERVICE_ACCOUNT, updateMask); + assertThat(bout.toString()).contains("Credentials updated successfully"); + } +} From 57a52ceb6db651d83c5670f2883ee4ba18a32588 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 13 Oct 2020 09:00:02 -0700 Subject: [PATCH 36/54] chore: regenerate README (#426) --- .github/readme/synth.metadata/synth.metadata | 4 ++-- README.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 8272feb0..fa7f914d 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "52ac0a029c1f47c5cdd9268e320a48ce80f7c212" + "sha": "16022eaa8f93b497fb569fe5be5ed996993adf02" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "487eba79f8260e34205d8ceb1ebcc65685085e19" + "sha": "ce61cf9ce6448082f56008aba3cee2aa77430063" } } ] diff --git a/README.md b/README.md index eeab8e24..f5ccd86d 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,7 @@ has instructions for running the samples. | Run History | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunHistory.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunHistory.java) | | Run Notification | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunNotification.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/RunNotification.java) | | Schedule Back Fill | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/ScheduleBackFill.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/ScheduleBackFill.java) | +| Update Credentials | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateCredentials.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateCredentials.java) | | Update Transfer Config | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateTransferConfig.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/UpdateTransferConfig.java) | From ec9cf9d7cd39352c902dd9e9a42b9c540b8b2b33 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 13 Oct 2020 09:42:59 -0700 Subject: [PATCH 37/54] chore: regenerate README (#427) --- .github/readme/synth.metadata/synth.metadata | 4 ++-- README.md | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index fa7f914d..62b0a807 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "16022eaa8f93b497fb569fe5be5ed996993adf02" + "sha": "57a52ceb6db651d83c5670f2883ee4ba18a32588" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ce61cf9ce6448082f56008aba3cee2aa77430063" + "sha": "9b7fadcd01ca5acb03a23519b6afc2fd347df3b5" } } ] diff --git a/README.md b/README.md index f5ccd86d..1dc7e498 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,6 @@ If you are using Maven without BOM, add this to your dependencies: ``` -[//]: # ({x-version-update-start:google-cloud-bigquerydatatransfer:released}) - If you are using Gradle, add this to your dependencies ```Groovy compile 'com.google.cloud:google-cloud-bigquerydatatransfer:1.0.12' @@ -53,7 +51,6 @@ If you are using SBT, add this to your dependencies ```Scala libraryDependencies += "com.google.cloud" % "google-cloud-bigquerydatatransfer" % "1.0.12" ``` -[//]: # ({x-version-update-end}) ## Authentication From 1247468d50dfc8a57b92a84974e8593293e88aeb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Oct 2020 16:51:37 +0200 Subject: [PATCH 38/54] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v0.11.0 (#428) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 02adf40e..d8df445d 100644 --- a/pom.xml +++ b/pom.xml @@ -70,7 +70,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.10.2 + 0.11.0 pom import From ab1c73bb580b99aad54a6702a31a9be595c0b9c7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 14 Oct 2020 07:51:53 -0700 Subject: [PATCH 39/54] ci(java): suggest formatting fixes (#429) GitHub action config to run the java formatter and suggest inline fixes on the pull request. This was tested in java-asset: [example PR](https://github.com/googleapis/java-asset/pull/392). Source-Author: Jeff Ching Source-Date: Tue Oct 13 09:04:08 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: b65ef07d99946d23e900ef2cc490274a16edd336 Source-Link: https://github.com/googleapis/synthtool/commit/b65ef07d99946d23e900ef2cc490274a16edd336 --- .github/workflows/formatting.yaml | 25 +++++++++++++++++++++++++ synth.metadata | 5 +++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/formatting.yaml diff --git a/.github/workflows/formatting.yaml b/.github/workflows/formatting.yaml new file mode 100644 index 00000000..d4d367cf --- /dev/null +++ b/.github/workflows/formatting.yaml @@ -0,0 +1,25 @@ +on: + pull_request_target: + types: [opened, synchronize] + branches: + - master +name: format +jobs: + format-code: + runs-on: ubuntu-latest + env: + ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }} + steps: + - uses: actions/checkout@v2 + with: + ref: ${{github.event.pull_request.head.ref}} + repository: ${{github.event.pull_request.head.repo.full_name}} + - uses: actions/setup-java@v1 + with: + java-version: 11 + - run: "mvn com.coveo:fmt-maven-plugin:format" + - uses: googleapis/code-suggester@v1.8.0 + with: + command: review + pull_number: ${{ github.event.pull_request.number }} + git_dir: '.' diff --git a/synth.metadata b/synth.metadata index 5f714e57..acec8ebf 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,7 +11,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "0344c1e844de6c82a48a8de0b4afcc188cbda1c5" + "sha": "ec9cf9d7cd39352c902dd9e9a42b9c540b8b2b33" } }, { @@ -26,7 +26,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0762e8ee2ec21cdfc4d82020b985a104feb0453b" + "sha": "b65ef07d99946d23e900ef2cc490274a16edd336" } } ], @@ -52,6 +52,7 @@ ".github/trusted-contribution.yml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", + ".github/workflows/formatting.yaml", ".github/workflows/samples.yaml", ".kokoro/build.bat", ".kokoro/coerce_logs.sh", From 3b56e76ec1c0957167602a04b86a00fc36b1bf52 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Oct 2020 16:53:12 +0200 Subject: [PATCH 40/54] chore(deps): update dependency com.google.cloud:libraries-bom to v12.1.0 (#432) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index f0e29864..027f98fd 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 12.0.0 + 12.1.0 pom import From 9bc3eb9e22778544166f8194fce1c336fc01fd05 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 14 Oct 2020 08:02:04 -0700 Subject: [PATCH 41/54] chore: regenerate README (#433) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-10-14 14:55:07,017 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-bigquerydatatransfer/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working directory clean 2020-10-14 14:55:07,953 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ```
Full log will be available here: https://source.cloud.google.com/results/invocations/b3ec59b7-15e3-4859-9757-a4cf4819a284/targets - [ ] To automatically regenerate this PR, check this box. --- .github/readme/synth.metadata/synth.metadata | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 62b0a807..8e168bba 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "57a52ceb6db651d83c5670f2883ee4ba18a32588" + "sha": "3b56e76ec1c0957167602a04b86a00fc36b1bf52" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "9b7fadcd01ca5acb03a23519b6afc2fd347df3b5" + "sha": "3c1fd09ba8d1c7b7092662f6f8330f521d4e7739" } } ] diff --git a/README.md b/README.md index 1dc7e498..ca169793 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 12.0.0 + 12.1.0 pom import From 093823687b6d870e3e443d349fe6a2ad035e6a85 Mon Sep 17 00:00:00 2001 From: Praful Makani Date: Wed, 14 Oct 2020 22:04:20 +0530 Subject: [PATCH 42/54] docs(samples): add create cloud storage transfer (#431) --- .../CreateAmazonS3Transfer.java | 1 - .../CreateCloudStorageTransfer.java | 79 ++++++++++ .../CreateCloudStorageTransferIT.java | 140 ++++++++++++++++++ 3 files changed, 219 insertions(+), 1 deletion(-) create mode 100644 samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateCloudStorageTransfer.java create mode 100644 samples/snippets/src/test/java/com/example/bigquerydatatransfer/CreateCloudStorageTransferIT.java diff --git a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateAmazonS3Transfer.java b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateAmazonS3Transfer.java index c0f2356a..00b2e3fe 100644 --- a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateAmazonS3Transfer.java +++ b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateAmazonS3Transfer.java @@ -77,7 +77,6 @@ public static void createAmazonS3Transfer(String projectId, TransferConfig trans } catch (ApiException ex) { System.out.print("Amazon s3 transfer was not created." + ex.toString()); } - ; } } // [END bigquerydatatransfer_create_amazons3_transfer] diff --git a/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateCloudStorageTransfer.java b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateCloudStorageTransfer.java new file mode 100644 index 00000000..c4f1e41c --- /dev/null +++ b/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateCloudStorageTransfer.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +package com.example.bigquerydatatransfer; + +// [START bigquerydatatransfer_create_cloudstorage_transfer] +import com.google.api.gax.rpc.ApiException; +import com.google.cloud.bigquery.datatransfer.v1.CreateTransferConfigRequest; +import com.google.cloud.bigquery.datatransfer.v1.DataTransferServiceClient; +import com.google.cloud.bigquery.datatransfer.v1.ProjectName; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.protobuf.Struct; +import com.google.protobuf.Value; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +// Sample to create google cloud storage transfer config +public class CreateCloudStorageTransfer { + + public static void main(String[] args) throws IOException { + // TODO(developer): Replace these variables before running the sample. + final String projectId = "MY_PROJECT_ID"; + String datasetId = "MY_DATASET_ID"; + String tableId = "MY_TABLE_ID"; + // GCS Uri + String sourceUri = "gs://cloud-samples-data/bigquery/us-states/us-states.csv"; + String fileFormat = "CSV"; + String fieldDelimiter = ","; + String skipLeadingRows = "1"; + Map params = new HashMap<>(); + params.put( + "destination_table_name_template", Value.newBuilder().setStringValue(tableId).build()); + params.put("data_path_template", Value.newBuilder().setStringValue(sourceUri).build()); + params.put("write_disposition", Value.newBuilder().setStringValue("APPEND").build()); + params.put("file_format", Value.newBuilder().setStringValue(fileFormat).build()); + params.put("field_delimiter", Value.newBuilder().setStringValue(fieldDelimiter).build()); + params.put("skip_leading_rows", Value.newBuilder().setStringValue(skipLeadingRows).build()); + TransferConfig transferConfig = + TransferConfig.newBuilder() + .setDestinationDatasetId(datasetId) + .setDisplayName("Your Google Cloud Storage Config Name") + .setDataSourceId("google_cloud_storage") + .setParams(Struct.newBuilder().putAllFields(params).build()) + .setSchedule("every 24 hours") + .build(); + createCloudStorageTransfer(projectId, transferConfig); + } + + public static void createCloudStorageTransfer(String projectId, TransferConfig transferConfig) + throws IOException { + try (DataTransferServiceClient client = DataTransferServiceClient.create()) { + ProjectName parent = ProjectName.of(projectId); + CreateTransferConfigRequest request = + CreateTransferConfigRequest.newBuilder() + .setParent(parent.toString()) + .setTransferConfig(transferConfig) + .build(); + TransferConfig config = client.createTransferConfig(request); + System.out.println("Cloud storage transfer created successfully :" + config.getName()); + } catch (ApiException ex) { + System.out.print("Cloud storage transfer was not created." + ex.toString()); + } + } +} +// [END bigquerydatatransfer_create_cloudstorage_transfer] diff --git a/samples/snippets/src/test/java/com/example/bigquerydatatransfer/CreateCloudStorageTransferIT.java b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/CreateCloudStorageTransferIT.java new file mode 100644 index 00000000..2121b2fb --- /dev/null +++ b/samples/snippets/src/test/java/com/example/bigquerydatatransfer/CreateCloudStorageTransferIT.java @@ -0,0 +1,140 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.example.bigquerydatatransfer; + +import static com.google.common.truth.Truth.assertThat; +import static junit.framework.TestCase.assertNotNull; + +import com.google.cloud.bigquery.BigQuery; +import com.google.cloud.bigquery.BigQueryOptions; +import com.google.cloud.bigquery.DatasetInfo; +import com.google.cloud.bigquery.Field; +import com.google.cloud.bigquery.Schema; +import com.google.cloud.bigquery.StandardSQLTypeName; +import com.google.cloud.bigquery.StandardTableDefinition; +import com.google.cloud.bigquery.TableDefinition; +import com.google.cloud.bigquery.TableId; +import com.google.cloud.bigquery.TableInfo; +import com.google.cloud.bigquery.datatransfer.v1.TransferConfig; +import com.google.protobuf.Struct; +import com.google.protobuf.Value; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.junit.After; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateCloudStorageTransferIT { + + private static final Logger LOG = Logger.getLogger(CreateCloudStorageTransferIT.class.getName()); + private static final String ID = UUID.randomUUID().toString().substring(0, 8); + private BigQuery bigquery; + private ByteArrayOutputStream bout; + private String name; + private String displayName; + private String datasetName; + private String tableName; + private PrintStream out; + private PrintStream originalPrintStream; + + private static final String PROJECT_ID = requireEnvVar("GOOGLE_CLOUD_PROJECT"); + + private static String requireEnvVar(String varName) { + String value = System.getenv(varName); + assertNotNull( + "Environment variable " + varName + " is required to perform these tests.", + System.getenv(varName)); + return value; + } + + @BeforeClass + public static void checkRequirements() { + requireEnvVar("GOOGLE_CLOUD_PROJECT"); + } + + @Before + public void setUp() { + displayName = "CLOUD_STORAGE_CONFIG_TEST_" + ID; + datasetName = "CLOUD_STORAGE_DATASET_NAME_TEST_" + ID; + tableName = "CLOUD_STORAGE_TABLE_NAME_TEST_" + ID; + // create a temporary dataset + bigquery = BigQueryOptions.getDefaultInstance().getService(); + bigquery.create(DatasetInfo.of(datasetName)); + // create a temporary table + Schema schema = + Schema.of( + Field.of("name", StandardSQLTypeName.STRING), + Field.of("post_abbr", StandardSQLTypeName.STRING)); + TableDefinition tableDefinition = StandardTableDefinition.of(schema); + TableInfo tableInfo = TableInfo.of(TableId.of(datasetName, tableName), tableDefinition); + bigquery.create(tableInfo); + + bout = new ByteArrayOutputStream(); + out = new PrintStream(bout); + originalPrintStream = System.out; + System.setOut(out); + } + + @After + public void tearDown() throws IOException { + // Clean up + DeleteTransferConfig.deleteTransferConfig(name); + // delete a temporary table + bigquery.delete(TableId.of(datasetName, tableName)); + // delete a temporary dataset + bigquery.delete(datasetName, BigQuery.DatasetDeleteOption.deleteContents()); + // restores print statements in the original method + System.out.flush(); + System.setOut(originalPrintStream); + LOG.log(Level.INFO, bout.toString()); + } + + @Test + public void testCreateCloudStorageTransfer() throws IOException { + String sourceUri = "gs://cloud-samples-data/bigquery/us-states/us-states.csv"; + String fileFormat = "CSV"; + String fieldDelimiter = ","; + String skipLeadingRows = "1"; + Map params = new HashMap<>(); + params.put( + "destination_table_name_template", Value.newBuilder().setStringValue(tableName).build()); + params.put("data_path_template", Value.newBuilder().setStringValue(sourceUri).build()); + params.put("write_disposition", Value.newBuilder().setStringValue("APPEND").build()); + params.put("file_format", Value.newBuilder().setStringValue(fileFormat).build()); + params.put("field_delimiter", Value.newBuilder().setStringValue(fieldDelimiter).build()); + params.put("skip_leading_rows", Value.newBuilder().setStringValue(skipLeadingRows).build()); + TransferConfig transferConfig = + TransferConfig.newBuilder() + .setDestinationDatasetId(datasetName) + .setDisplayName(displayName) + .setDataSourceId("google_cloud_storage") + .setParams(Struct.newBuilder().putAllFields(params).build()) + .setSchedule("every 24 hours") + .build(); + CreateCloudStorageTransfer.createCloudStorageTransfer(PROJECT_ID, transferConfig); + String result = bout.toString(); + name = result.substring(result.indexOf(":") + 1, result.length() - 1); + assertThat(result).contains("Cloud storage transfer created successfully :"); + } +} From ae5ad3d1f27fe5a924aac9527f266027f60374bc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 14 Oct 2020 11:36:03 -0700 Subject: [PATCH 43/54] chore: regenerate README (#434) --- .github/readme/synth.metadata/synth.metadata | 4 ++-- README.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index 8e168bba..bc531001 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "3b56e76ec1c0957167602a04b86a00fc36b1bf52" + "sha": "093823687b6d870e3e443d349fe6a2ad035e6a85" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "3c1fd09ba8d1c7b7092662f6f8330f521d4e7739" + "sha": "477764cc4ee6db346d3febef2bb1ea0abf27de52" } } ] diff --git a/README.md b/README.md index ca169793..4a0bd726 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ has instructions for running the samples. | --------------------------- | --------------------------------- | ------ | | Copy Dataset | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CopyDataset.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CopyDataset.java) | | Create Amazon S3 Transfer | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateAmazonS3Transfer.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateAmazonS3Transfer.java) | +| Create Cloud Storage Transfer | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateCloudStorageTransfer.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateCloudStorageTransfer.java) | | Create Scheduled Query | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQuery.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQuery.java) | | Create Scheduled Query With Service Account | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQueryWithServiceAccount.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/CreateScheduledQueryWithServiceAccount.java) | | Delete Scheduled Query | [source code](https://github.com/googleapis/java-bigquerydatatransfer/blob/master/samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteScheduledQuery.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-bigquerydatatransfer&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/bigquerydatatransfer/DeleteScheduledQuery.java) | From 457f232a9621e15ddc08046b0ae8a7337d41ee7c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 16 Oct 2020 09:08:29 -0700 Subject: [PATCH 44/54] build(java): auto-approve README regeneration (#438) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/3522a8b4-2636-4631-9449-70abbf240098/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/7c5370937dd9ba9dcf9cd7d2af880a58b389b4f1 --- .github/workflows/approve-readme.yaml | 54 +++++++++++++++++++++++++++ synth.metadata | 5 ++- 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/approve-readme.yaml diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml new file mode 100644 index 00000000..e2d841d6 --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -0,0 +1,54 @@ +on: + pull_request: +name: auto-merge-readme +jobs: + approve: + runs-on: ubuntu-latest + if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' + steps: + - uses: actions/github-script@v3.0.0 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + script: | + // only approve PRs from yoshi-automation + if (context.payload.pull_request.user.login !== "yoshi-automation") { + return; + } + + // only approve PRs like "chore: release " + if (!context.payload.pull_request.title === "chore: regenerate README") { + return; + } + + // only approve PRs with README.md and synth.metadata changes + const files = new Set( + ( + await github.paginate( + github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }) + ) + ).map(file => file.filename) + ); + if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) { + return; + } + + // approve README regeneration PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped PR!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach automerge label + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['automerge'] + }); diff --git a/synth.metadata b/synth.metadata index acec8ebf..b7062b65 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,7 +11,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "ec9cf9d7cd39352c902dd9e9a42b9c540b8b2b33" + "sha": "ae5ad3d1f27fe5a924aac9527f266027f60374bc" } }, { @@ -26,7 +26,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b65ef07d99946d23e900ef2cc490274a16edd336" + "sha": "7c5370937dd9ba9dcf9cd7d2af880a58b389b4f1" } } ], @@ -50,6 +50,7 @@ ".github/readme/synth.py", ".github/release-please.yml", ".github/trusted-contribution.yml", + ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", ".github/workflows/ci.yaml", ".github/workflows/formatting.yaml", From a47615d9e42b5b626bdd48f0bf2d9270f9d8462c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 16 Oct 2020 18:14:06 +0200 Subject: [PATCH 45/54] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v0.9.3 (#437) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | patch | `0.9.2` -> `0.9.3` | --- ### Release Notes
googleapis/java-shared-config ### [`v0.9.3`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​093-httpswwwgithubcomgoogleapisjava-shared-configcomparev092v093-2020-10-15) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v0.9.2...v0.9.3)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquerydatatransfer). --- google-cloud-bigquerydatatransfer-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-bigquerydatatransfer-bom/pom.xml b/google-cloud-bigquerydatatransfer-bom/pom.xml index 47281f05..cf5785be 100644 --- a/google-cloud-bigquerydatatransfer-bom/pom.xml +++ b/google-cloud-bigquerydatatransfer-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 0.9.2 + 0.9.3 Google Cloud bigquerydatatransfer BOM diff --git a/pom.xml b/pom.xml index d8df445d..2c1d494e 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 0.9.2 + 0.9.3 From d9c7a5c6b57b3a3564457d6d68d645bc20ef4b5b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 19 Oct 2020 18:58:01 +0200 Subject: [PATCH 46/54] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v0.12.1 (#439) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2c1d494e..bb34ae62 100644 --- a/pom.xml +++ b/pom.xml @@ -70,7 +70,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.11.0 + 0.12.1 pom import From 6df9bdcffa941576edbb4657a97b580bb9fdd4fb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 20 Oct 2020 15:44:12 -0700 Subject: [PATCH 47/54] build(java): enable snippet-bot (#441) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b2404dbe-a292-4512-b9eb-69b2f2416765/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5a506ec8765cc04f7e29f888b8e9b257d9a7ae11 --- .github/snippet-bot.yml | 0 synth.metadata | 5 +++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 .github/snippet-bot.yml diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml new file mode 100644 index 00000000..e69de29b diff --git a/synth.metadata b/synth.metadata index b7062b65..135e4e6b 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,7 +11,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "ae5ad3d1f27fe5a924aac9527f266027f60374bc" + "sha": "d9c7a5c6b57b3a3564457d6d68d645bc20ef4b5b" } }, { @@ -26,7 +26,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7c5370937dd9ba9dcf9cd7d2af880a58b389b4f1" + "sha": "5a506ec8765cc04f7e29f888b8e9b257d9a7ae11" } } ], @@ -49,6 +49,7 @@ ".github/PULL_REQUEST_TEMPLATE.md", ".github/readme/synth.py", ".github/release-please.yml", + ".github/snippet-bot.yml", ".github/trusted-contribution.yml", ".github/workflows/approve-readme.yaml", ".github/workflows/auto-release.yaml", From e5027fceb9665e1a8849c95d4d67a8ee3d567cff Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Oct 2020 00:50:35 +0200 Subject: [PATCH 48/54] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v0.13.0 (#445) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | minor | `0.12.1` -> `0.13.0` | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v0.13.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​0130-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare0121v0130-2020-10-20) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v0.12.1...v0.13.0) ##### Features - add jackson-core to the list of managed dependencies ([#​190](https://www.github.com/googleapis/java-shared-dependencies/issues/190)) ([b37035e](https://www.github.com/googleapis/java-shared-dependencies/commit/b37035ed9b0beeb5e07d6e1c121154eece1a2c87)) ##### Dependencies - update dependency com.google.guava:guava-bom to v30 ([#​181](https://www.github.com/googleapis/java-shared-dependencies/issues/181)) ([bdb1e58](https://www.github.com/googleapis/java-shared-dependencies/commit/bdb1e582288d06a872e36ac8b778563f2d088468)) - update gax.version to v1.60.0 ([#​187](https://www.github.com/googleapis/java-shared-dependencies/issues/187)) ([8a8adf7](https://www.github.com/googleapis/java-shared-dependencies/commit/8a8adf7745d563c449bf095aad63b5e4a94e1a7d)) - update google.common-protos.version to v2 ([#​174](https://www.github.com/googleapis/java-shared-dependencies/issues/174)) ([3f7e3ff](https://www.github.com/googleapis/java-shared-dependencies/commit/3f7e3ffd5e07d2f11f0aa981dae2bdf5381e429f)) ##### [0.12.1](https://www.github.com/googleapis/java-shared-dependencies/compare/0.12.0...v0.12.1) (2020-10-16) ##### Dependencies - update dependency com.google.api:api-common to v1.10.1 ([#​180](https://www.github.com/googleapis/java-shared-dependencies/issues/180)) ([b1f2d5d](https://www.github.com/googleapis/java-shared-dependencies/commit/b1f2d5dfde24fcf683eeb5600fce7f51190ecce8))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquerydatatransfer). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bb34ae62..c61741a7 100644 --- a/pom.xml +++ b/pom.xml @@ -70,7 +70,7 @@ com.google.cloud google-cloud-shared-dependencies - 0.12.1 + 0.13.0 pom import From a3bbe899149e85ba1b3669eb1122cf2a0ebcdaac Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Oct 2020 00:51:05 +0200 Subject: [PATCH 49/54] chore(deps): update dependency com.google.cloud:libraries-bom to v13 (#442) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.cloud:libraries-bom](https://togithub.com/GoogleCloudPlatform/cloud-opensource-java) | major | `12.1.0` -> `13.0.0` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquerydatatransfer). --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 027f98fd..1be82da0 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 12.1.0 + 13.0.0 pom import From 5c33507b9f9628eee84b1afcbebd54cc31b101a6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Oct 2020 01:36:05 +0200 Subject: [PATCH 50/54] deps: update dependency com.google.cloud:google-cloud-pubsub to v1.108.5 (#440) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index c51d8ac4..eb757289 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -60,7 +60,7 @@ com.google.cloud google-cloud-pubsub - 1.108.4 + 1.108.5 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index fd2a68fd..787402d5 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -59,7 +59,7 @@ com.google.cloud google-cloud-pubsub - 1.108.4 + 1.108.5 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 1be82da0..daf59ce8 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -71,7 +71,7 @@ com.google.cloud google-cloud-pubsub - 1.108.4 + 1.108.5 test From 85d78bc1770969e1e5feda76d3134ae3313a2652 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Oct 2020 01:36:24 +0200 Subject: [PATCH 51/54] deps: update dependency com.google.cloud:google-cloud-bigquery to v1.123.0 (#444) --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index eb757289..07c6ebeb 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -54,7 +54,7 @@ com.google.cloud google-cloud-bigquery - 1.122.2 + 1.123.0 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 787402d5..d1eb80c6 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -53,7 +53,7 @@ com.google.cloud google-cloud-bigquery - 1.122.2 + 1.123.0 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index daf59ce8..27252025 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -65,7 +65,7 @@ com.google.cloud google-cloud-bigquery - 1.122.2 + 1.123.0 test From 2c52dc32f8417bd40ba981a25b4f11c7b7273140 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 20 Oct 2020 16:48:09 -0700 Subject: [PATCH 52/54] chore: regenerate README (#446) This PR was generated using Autosynth. :rainbow:
Log from Synthtool ``` 2020-10-20 22:57:36,067 synthtool [DEBUG] > Executing /root/.cache/synthtool/java-bigquerydatatransfer/.github/readme/synth.py. On branch autosynth-readme nothing to commit, working directory clean 2020-10-20 22:57:36,945 synthtool [DEBUG] > Wrote metadata to .github/readme/synth.metadata/synth.metadata. ```
Full log will be available here: https://source.cloud.google.com/results/invocations/1df56b54-a661-4b21-bcc6-56ea7cc86d54/targets - [ ] To automatically regenerate this PR, check this box. --- .github/readme/synth.metadata/synth.metadata | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index bc531001..334f24be 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "093823687b6d870e3e443d349fe6a2ad035e6a85" + "sha": "a3bbe899149e85ba1b3669eb1122cf2a0ebcdaac" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "477764cc4ee6db346d3febef2bb1ea0abf27de52" + "sha": "6abb59097be84599a1d6091fe534a49e5c5cf948" } } ] diff --git a/README.md b/README.md index 4a0bd726..ba02c301 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 12.1.0 + 13.0.0 pom import From f96688152dcb2cac2e0dae6f4aa8527c86df9896 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Oct 2020 02:02:09 +0200 Subject: [PATCH 53/54] deps: update dependency com.google.truth:truth to v1.1 (#443) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [com.google.truth:truth](com/google/truth/truth) | minor | `1.0.1` -> `1.1` | --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-bigquerydatatransfer). --- samples/install-without-bom/pom.xml | 3 +-- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 07c6ebeb..2648e51d 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -23,7 +23,6 @@ UTF-8
- @@ -48,7 +47,7 @@ com.google.truth truth - 1.0.1 + 1.1 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index d1eb80c6..4913cafd 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -47,7 +47,7 @@ com.google.truth truth - 1.0.1 + 1.1 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 27252025..9822436d 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -59,7 +59,7 @@ com.google.truth truth - 1.0.1 + 1.1 test From de833e5e8b9026bc566b83c4058fe07fc65a35f6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 Oct 2020 00:22:10 +0000 Subject: [PATCH 54/54] chore: release 1.0.13 (#386) :robot: I have created a release \*beep\* \*boop\* --- ### [1.0.13](https://www.github.com/googleapis/java-bigquerydatatransfer/compare/v1.0.12...v1.0.13) (2020-10-21) ### Documentation * **samples:** add copy dataset ([#389](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/389)) ([37097f8](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/37097f8d1e7745007f39533dc9fcd8256ac2ce3f)) * **samples:** add create amazon s3 transfer ([#416](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/416)) ([52ac0a0](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/52ac0a029c1f47c5cdd9268e320a48ce80f7c212)) * **samples:** add create cloud storage transfer ([#431](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/431)) ([0938236](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/093823687b6d870e3e443d349fe6a2ad035e6a85)) * **samples:** add delete transfer config ([#388](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/388)) ([61ce27d](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/61ce27d43653ce5f2ae8647370240ec80148399e)) * **samples:** add disable transfer config ([#384](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/384)) ([533a681](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/533a68158dd92d083aba9e13493e4d66cd3d85df)) * **samples:** add re-enable transfer config ([#385](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/385)) ([7d61025](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/7d61025046c6172dbe8f1f52bd90324f9a5357c4)) * **samples:** add schedule backfill ([#390](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/390)) ([96eb331](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/96eb331fdf9d4862d9149bb84d6d2493218db2fc)) * **samples:** add update credentials ([#425](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/425)) ([16022ea](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/16022eaa8f93b497fb569fe5be5ed996993adf02)) ### Dependencies * update dependency com.google.cloud:google-cloud-bigquery to v1.122.0 ([#398](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/398)) ([e0edcd7](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/e0edcd7c1a7d22c158ea39ffcb4018dae181c6b0)) * update dependency com.google.cloud:google-cloud-bigquery to v1.122.1 ([#411](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/411)) ([41fb285](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/41fb285d233d9598e7b54e49b4a67b0c49bb4af3)) * update dependency com.google.cloud:google-cloud-bigquery to v1.122.2 ([#418](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/418)) ([ad92b1a](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/ad92b1af71bbf747da57aae011f47bc5d7f07c27)) * update dependency com.google.cloud:google-cloud-bigquery to v1.123.0 ([#444](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/444)) ([85d78bc](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/85d78bc1770969e1e5feda76d3134ae3313a2652)) * update dependency com.google.cloud:google-cloud-pubsub to v1.108.3 ([#407](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/407)) ([78e055e](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/78e055e61ead073bda37289043c350b93c8ace50)) * update dependency com.google.cloud:google-cloud-pubsub to v1.108.4 ([#423](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/423)) ([1807342](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/18073427ef4c0103949f6f7285c8869e08ff8205)) * update dependency com.google.cloud:google-cloud-pubsub to v1.108.5 ([#440](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/440)) ([5c33507](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/5c33507b9f9628eee84b1afcbebd54cc31b101a6)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.1 ([#412](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/412)) ([0344c1e](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/0344c1e844de6c82a48a8de0b4afcc188cbda1c5)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 ([#415](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/415)) ([4eb4530](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/4eb4530c54704eaf5418331746b84e5a895bf930)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.11.0 ([#428](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/428)) ([1247468](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/1247468d50dfc8a57b92a84974e8593293e88aeb)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.12.1 ([#439](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/439)) ([d9c7a5c](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/d9c7a5c6b57b3a3564457d6d68d645bc20ef4b5b)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v0.13.0 ([#445](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/445)) ([e5027fc](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/e5027fceb9665e1a8849c95d4d67a8ee3d567cff)) * update dependency com.google.truth:truth to v1.1 ([#443](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/443)) ([f966881](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/f96688152dcb2cac2e0dae6f4aa8527c86df9896)) * update dependency junit:junit to v4.13.1 ([#421](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/421)) ([310122b](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/310122bb335e8f716d12890c8e06397e1b997ac3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- CHANGELOG.md | 32 +++++++++++++++++++ google-cloud-bigquerydatatransfer-bom/pom.xml | 8 ++--- google-cloud-bigquerydatatransfer/pom.xml | 4 +-- .../pom.xml | 4 +-- pom.xml | 8 ++--- .../pom.xml | 4 +-- samples/snapshot/pom.xml | 2 +- versions.txt | 6 ++-- 8 files changed, 50 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dbc388b..43955b6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,37 @@ # Changelog +### [1.0.13](https://www.github.com/googleapis/java-bigquerydatatransfer/compare/v1.0.12...v1.0.13) (2020-10-21) + + +### Documentation + +* **samples:** add copy dataset ([#389](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/389)) ([37097f8](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/37097f8d1e7745007f39533dc9fcd8256ac2ce3f)) +* **samples:** add create amazon s3 transfer ([#416](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/416)) ([52ac0a0](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/52ac0a029c1f47c5cdd9268e320a48ce80f7c212)) +* **samples:** add create cloud storage transfer ([#431](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/431)) ([0938236](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/093823687b6d870e3e443d349fe6a2ad035e6a85)) +* **samples:** add delete transfer config ([#388](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/388)) ([61ce27d](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/61ce27d43653ce5f2ae8647370240ec80148399e)) +* **samples:** add disable transfer config ([#384](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/384)) ([533a681](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/533a68158dd92d083aba9e13493e4d66cd3d85df)) +* **samples:** add re-enable transfer config ([#385](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/385)) ([7d61025](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/7d61025046c6172dbe8f1f52bd90324f9a5357c4)) +* **samples:** add schedule backfill ([#390](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/390)) ([96eb331](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/96eb331fdf9d4862d9149bb84d6d2493218db2fc)) +* **samples:** add update credentials ([#425](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/425)) ([16022ea](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/16022eaa8f93b497fb569fe5be5ed996993adf02)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-bigquery to v1.122.0 ([#398](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/398)) ([e0edcd7](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/e0edcd7c1a7d22c158ea39ffcb4018dae181c6b0)) +* update dependency com.google.cloud:google-cloud-bigquery to v1.122.1 ([#411](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/411)) ([41fb285](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/41fb285d233d9598e7b54e49b4a67b0c49bb4af3)) +* update dependency com.google.cloud:google-cloud-bigquery to v1.122.2 ([#418](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/418)) ([ad92b1a](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/ad92b1af71bbf747da57aae011f47bc5d7f07c27)) +* update dependency com.google.cloud:google-cloud-bigquery to v1.123.0 ([#444](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/444)) ([85d78bc](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/85d78bc1770969e1e5feda76d3134ae3313a2652)) +* update dependency com.google.cloud:google-cloud-pubsub to v1.108.3 ([#407](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/407)) ([78e055e](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/78e055e61ead073bda37289043c350b93c8ace50)) +* update dependency com.google.cloud:google-cloud-pubsub to v1.108.4 ([#423](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/423)) ([1807342](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/18073427ef4c0103949f6f7285c8869e08ff8205)) +* update dependency com.google.cloud:google-cloud-pubsub to v1.108.5 ([#440](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/440)) ([5c33507](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/5c33507b9f9628eee84b1afcbebd54cc31b101a6)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.1 ([#412](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/412)) ([0344c1e](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/0344c1e844de6c82a48a8de0b4afcc188cbda1c5)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.10.2 ([#415](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/415)) ([4eb4530](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/4eb4530c54704eaf5418331746b84e5a895bf930)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.11.0 ([#428](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/428)) ([1247468](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/1247468d50dfc8a57b92a84974e8593293e88aeb)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.12.1 ([#439](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/439)) ([d9c7a5c](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/d9c7a5c6b57b3a3564457d6d68d645bc20ef4b5b)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.13.0 ([#445](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/445)) ([e5027fc](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/e5027fceb9665e1a8849c95d4d67a8ee3d567cff)) +* update dependency com.google.truth:truth to v1.1 ([#443](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/443)) ([f966881](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/f96688152dcb2cac2e0dae6f4aa8527c86df9896)) +* update dependency junit:junit to v4.13.1 ([#421](https://www.github.com/googleapis/java-bigquerydatatransfer/issues/421)) ([310122b](https://www.github.com/googleapis/java-bigquerydatatransfer/commit/310122bb335e8f716d12890c8e06397e1b997ac3)) + ### [1.0.12](https://www.github.com/googleapis/java-bigquerydatatransfer/compare/v1.0.11...v1.0.12) (2020-09-23) diff --git a/google-cloud-bigquerydatatransfer-bom/pom.xml b/google-cloud-bigquerydatatransfer-bom/pom.xml index cf5785be..0da7c400 100644 --- a/google-cloud-bigquerydatatransfer-bom/pom.xml +++ b/google-cloud-bigquerydatatransfer-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigquerydatatransfer-bom - 1.0.13-SNAPSHOT + 1.0.13 pom com.google.cloud @@ -64,17 +64,17 @@ com.google.cloud google-cloud-bigquerydatatransfer - 1.0.13-SNAPSHOT + 1.0.13 com.google.api.grpc proto-google-cloud-bigquerydatatransfer-v1 - 1.0.13-SNAPSHOT + 1.0.13 com.google.api.grpc grpc-google-cloud-bigquerydatatransfer-v1 - 1.0.13-SNAPSHOT + 1.0.13 diff --git a/google-cloud-bigquerydatatransfer/pom.xml b/google-cloud-bigquerydatatransfer/pom.xml index a4777370..de85d92a 100644 --- a/google-cloud-bigquerydatatransfer/pom.xml +++ b/google-cloud-bigquerydatatransfer/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-bigquerydatatransfer - 1.0.13-SNAPSHOT + 1.0.13 jar BigQuery DataTransfer https://github.com/googleapis/java-bigquerydatatransfer @@ -11,7 +11,7 @@ com.google.cloud google-cloud-bigquerydatatransfer-parent - 1.0.13-SNAPSHOT + 1.0.13 google-cloud-bigquerydatatransfer diff --git a/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml b/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml index 092d8d34..7f2e4531 100644 --- a/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml +++ b/grpc-google-cloud-bigquerydatatransfer-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-bigquerydatatransfer-v1 - 1.0.13-SNAPSHOT + 1.0.13 grpc-google-cloud-bigquerydatatransfer-v1 GRPC library for grpc-google-cloud-bigquerydatatransfer-v1 com.google.cloud google-cloud-bigquerydatatransfer-parent - 1.0.13-SNAPSHOT + 1.0.13 diff --git a/pom.xml b/pom.xml index c61741a7..dca50960 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-bigquerydatatransfer-parent pom - 1.0.13-SNAPSHOT + 1.0.13 BigQuery DataTransfer Parent https://github.com/googleapis/java-bigquerydatatransfer @@ -77,17 +77,17 @@ com.google.api.grpc proto-google-cloud-bigquerydatatransfer-v1 - 1.0.13-SNAPSHOT + 1.0.13 com.google.api.grpc grpc-google-cloud-bigquerydatatransfer-v1 - 1.0.13-SNAPSHOT + 1.0.13 com.google.cloud google-cloud-bigquerydatatransfer - 1.0.13-SNAPSHOT + 1.0.13 diff --git a/proto-google-cloud-bigquerydatatransfer-v1/pom.xml b/proto-google-cloud-bigquerydatatransfer-v1/pom.xml index b3caa453..01e80e9b 100644 --- a/proto-google-cloud-bigquerydatatransfer-v1/pom.xml +++ b/proto-google-cloud-bigquerydatatransfer-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-bigquerydatatransfer-v1 - 1.0.13-SNAPSHOT + 1.0.13 proto-google-cloud-bigquerydatatransfer-v1 PROTO library for proto-google-cloud-bigquerydatatransfer-v1 com.google.cloud google-cloud-bigquerydatatransfer-parent - 1.0.13-SNAPSHOT + 1.0.13 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 4913cafd..2c85420f 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-bigquerydatatransfer - 1.0.13-SNAPSHOT + 1.0.13 diff --git a/versions.txt b/versions.txt index fcea00dc..07f5bc03 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -proto-google-cloud-bigquerydatatransfer-v1:1.0.12:1.0.13-SNAPSHOT -grpc-google-cloud-bigquerydatatransfer-v1:1.0.12:1.0.13-SNAPSHOT -google-cloud-bigquerydatatransfer:1.0.12:1.0.13-SNAPSHOT +proto-google-cloud-bigquerydatatransfer-v1:1.0.13:1.0.13 +grpc-google-cloud-bigquerydatatransfer-v1:1.0.13:1.0.13 +google-cloud-bigquerydatatransfer:1.0.13:1.0.13