From a2e56305886fa35acb15d5886d63e6b10b905e5a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 17 Feb 2021 15:44:18 -0800 Subject: [PATCH] chore: update gapic-generator-java to 0.0.20 (#638) Committer: @miraleung PiperOrigin-RevId: 357800868 Source-Author: Google APIs Source-Date: Tue Feb 16 14:06:04 2021 -0800 Source-Repo: googleapis/googleapis Source-Sha: e8bc4471a88ac5f60defe3ed436f517174e59ba0 Source-Link: https://github.com/googleapis/googleapis/commit/e8bc4471a88ac5f60defe3ed436f517174e59ba0 --- .../v1/stub/GrpcDataTransferServiceStub.java | 18 +++ .../v1/DataTransferServiceClientTest.java | 10 ++ .../v1/MockDataTransferServiceImpl.java | 112 +++++++++++++++--- synth.metadata | 6 +- 4 files changed, 129 insertions(+), 17 deletions(-) diff --git a/google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/GrpcDataTransferServiceStub.java b/google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/GrpcDataTransferServiceStub.java index cf2968e2..9666ffae 100644 --- a/google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/GrpcDataTransferServiceStub.java +++ b/google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/GrpcDataTransferServiceStub.java @@ -585,83 +585,101 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable getDataSourceCallable() { return getDataSourceCallable; } + @Override public UnaryCallable listDataSourcesCallable() { return listDataSourcesCallable; } + @Override public UnaryCallable listDataSourcesPagedCallable() { return listDataSourcesPagedCallable; } + @Override public UnaryCallable createTransferConfigCallable() { return createTransferConfigCallable; } + @Override public UnaryCallable updateTransferConfigCallable() { return updateTransferConfigCallable; } + @Override public UnaryCallable deleteTransferConfigCallable() { return deleteTransferConfigCallable; } + @Override public UnaryCallable getTransferConfigCallable() { return getTransferConfigCallable; } + @Override public UnaryCallable listTransferConfigsCallable() { return listTransferConfigsCallable; } + @Override public UnaryCallable listTransferConfigsPagedCallable() { return listTransferConfigsPagedCallable; } + @Override public UnaryCallable scheduleTransferRunsCallable() { return scheduleTransferRunsCallable; } + @Override public UnaryCallable startManualTransferRunsCallable() { return startManualTransferRunsCallable; } + @Override public UnaryCallable getTransferRunCallable() { return getTransferRunCallable; } + @Override public UnaryCallable deleteTransferRunCallable() { return deleteTransferRunCallable; } + @Override public UnaryCallable listTransferRunsCallable() { return listTransferRunsCallable; } + @Override public UnaryCallable listTransferRunsPagedCallable() { return listTransferRunsPagedCallable; } + @Override public UnaryCallable listTransferLogsCallable() { return listTransferLogsCallable; } + @Override public UnaryCallable listTransferLogsPagedCallable() { return listTransferLogsPagedCallable; } + @Override public UnaryCallable checkValidCredsCallable() { return checkValidCredsCallable; } diff --git a/google-cloud-bigquerydatatransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClientTest.java b/google-cloud-bigquerydatatransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClientTest.java index 90e8c28b..3248b2a3 100644 --- a/google-cloud-bigquerydatatransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClientTest.java +++ b/google-cloud-bigquerydatatransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClientTest.java @@ -99,6 +99,7 @@ public void getDataSourceTest() throws Exception { .setDescription("description-1724546052") .setClientId("clientId908408390") .addAllScopes(new ArrayList()) + .setTransferType(TransferType.forNumber(0)) .setSupportsMultipleTransfers(true) .setUpdateDeadlineSeconds(991471694) .setDefaultSchedule("defaultSchedule1300167672") @@ -152,6 +153,7 @@ public void getDataSourceTest2() throws Exception { .setDescription("description-1724546052") .setClientId("clientId908408390") .addAllScopes(new ArrayList()) + .setTransferType(TransferType.forNumber(0)) .setSupportsMultipleTransfers(true) .setUpdateDeadlineSeconds(991471694) .setDefaultSchedule("defaultSchedule1300167672") @@ -342,6 +344,7 @@ public void createTransferConfigTest() throws Exception { .setDisabled(true) .setUpdateTime(Timestamp.newBuilder().build()) .setNextRunTime(Timestamp.newBuilder().build()) + .setState(TransferState.forNumber(0)) .setUserId(-147132913) .setDatasetRegion("datasetRegion1032293772") .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") @@ -399,6 +402,7 @@ public void createTransferConfigTest2() throws Exception { .setDisabled(true) .setUpdateTime(Timestamp.newBuilder().build()) .setNextRunTime(Timestamp.newBuilder().build()) + .setState(TransferState.forNumber(0)) .setUserId(-147132913) .setDatasetRegion("datasetRegion1032293772") .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") @@ -456,6 +460,7 @@ public void createTransferConfigTest3() throws Exception { .setDisabled(true) .setUpdateTime(Timestamp.newBuilder().build()) .setNextRunTime(Timestamp.newBuilder().build()) + .setState(TransferState.forNumber(0)) .setUserId(-147132913) .setDatasetRegion("datasetRegion1032293772") .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") @@ -513,6 +518,7 @@ public void updateTransferConfigTest() throws Exception { .setDisabled(true) .setUpdateTime(Timestamp.newBuilder().build()) .setNextRunTime(Timestamp.newBuilder().build()) + .setState(TransferState.forNumber(0)) .setUserId(-147132913) .setDatasetRegion("datasetRegion1032293772") .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") @@ -642,6 +648,7 @@ public void getTransferConfigTest() throws Exception { .setDisabled(true) .setUpdateTime(Timestamp.newBuilder().build()) .setNextRunTime(Timestamp.newBuilder().build()) + .setState(TransferState.forNumber(0)) .setUserId(-147132913) .setDatasetRegion("datasetRegion1032293772") .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") @@ -697,6 +704,7 @@ public void getTransferConfigTest2() throws Exception { .setDisabled(true) .setUpdateTime(Timestamp.newBuilder().build()) .setNextRunTime(Timestamp.newBuilder().build()) + .setState(TransferState.forNumber(0)) .setUserId(-147132913) .setDatasetRegion("datasetRegion1032293772") .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") @@ -1022,6 +1030,7 @@ public void getTransferRunTest() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setParams(Struct.newBuilder().build()) .setDataSourceId("dataSourceId-1221402528") + .setState(TransferState.forNumber(0)) .setUserId(-147132913) .setSchedule("schedule-697920873") .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") @@ -1076,6 +1085,7 @@ public void getTransferRunTest2() throws Exception { .setUpdateTime(Timestamp.newBuilder().build()) .setParams(Struct.newBuilder().build()) .setDataSourceId("dataSourceId-1221402528") + .setState(TransferState.forNumber(0)) .setUserId(-147132913) .setSchedule("schedule-697920873") .setNotificationPubsubTopic("notificationPubsubTopic-1361224991") diff --git a/google-cloud-bigquerydatatransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/MockDataTransferServiceImpl.java b/google-cloud-bigquerydatatransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/MockDataTransferServiceImpl.java index a1793bb9..a290d49b 100644 --- a/google-cloud-bigquerydatatransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/MockDataTransferServiceImpl.java +++ b/google-cloud-bigquerydatatransfer/src/test/java/com/google/cloud/bigquery/datatransfer/v1/MockDataTransferServiceImpl.java @@ -70,7 +70,13 @@ public void getDataSource( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetDataSource, expected %s or %s", + response.getClass().getName(), + DataSource.class.getName(), + Exception.class.getName()))); } } @@ -85,7 +91,13 @@ public void listDataSources( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListDataSources, expected %s or %s", + response.getClass().getName(), + ListDataSourcesResponse.class.getName(), + Exception.class.getName()))); } } @@ -100,7 +112,13 @@ public void createTransferConfig( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateTransferConfig, expected %s or %s", + response.getClass().getName(), + TransferConfig.class.getName(), + Exception.class.getName()))); } } @@ -115,7 +133,13 @@ public void updateTransferConfig( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateTransferConfig, expected %s or %s", + response.getClass().getName(), + TransferConfig.class.getName(), + Exception.class.getName()))); } } @@ -130,7 +154,13 @@ public void deleteTransferConfig( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteTransferConfig, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -145,7 +175,13 @@ public void getTransferConfig( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetTransferConfig, expected %s or %s", + response.getClass().getName(), + TransferConfig.class.getName(), + Exception.class.getName()))); } } @@ -161,7 +197,13 @@ public void listTransferConfigs( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTransferConfigs, expected %s or %s", + response.getClass().getName(), + ListTransferConfigsResponse.class.getName(), + Exception.class.getName()))); } } @@ -177,7 +219,13 @@ public void scheduleTransferRuns( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ScheduleTransferRuns, expected %s or %s", + response.getClass().getName(), + ScheduleTransferRunsResponse.class.getName(), + Exception.class.getName()))); } } @@ -193,7 +241,13 @@ public void startManualTransferRuns( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method StartManualTransferRuns, expected %s or %s", + response.getClass().getName(), + StartManualTransferRunsResponse.class.getName(), + Exception.class.getName()))); } } @@ -208,7 +262,13 @@ public void getTransferRun( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetTransferRun, expected %s or %s", + response.getClass().getName(), + TransferRun.class.getName(), + Exception.class.getName()))); } } @@ -223,7 +283,13 @@ public void deleteTransferRun( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteTransferRun, expected %s or %s", + response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); } } @@ -238,7 +304,13 @@ public void listTransferRuns( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTransferRuns, expected %s or %s", + response.getClass().getName(), + ListTransferRunsResponse.class.getName(), + Exception.class.getName()))); } } @@ -253,7 +325,13 @@ public void listTransferLogs( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListTransferLogs, expected %s or %s", + response.getClass().getName(), + ListTransferLogsResponse.class.getName(), + Exception.class.getName()))); } } @@ -268,7 +346,13 @@ public void checkValidCreds( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CheckValidCreds, expected %s or %s", + response.getClass().getName(), + CheckValidCredsResponse.class.getName(), + Exception.class.getName()))); } } } diff --git a/synth.metadata b/synth.metadata index fb8b53e0..ee80dfb6 100644 --- a/synth.metadata +++ b/synth.metadata @@ -11,15 +11,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-bigquerydatatransfer.git", - "sha": "2eec98d805f7f8a2705286b39f890c07031b3bd6" + "sha": "d05ad82d21e98a348a42b27f6a5fd1523d92759e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb", - "internalRef": "356341083" + "sha": "e8bc4471a88ac5f60defe3ed436f517174e59ba0", + "internalRef": "357800868" } }, {