Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

Commit dd11852

Browse files
fix: migrate bq/datatransfer/v1 to grpc_service_config (#239)
PiperOrigin-RevId: 320218003 Source-Author: Google APIs <[email protected]> Source-Date: Wed Jul 8 10:38:55 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 8dd269fb6fc7635b7edd67403b89450e0cd450c9 Source-Link: googleapis/googleapis@8dd269f
1 parent 4f75d09 commit dd11852

File tree

8 files changed

+720
-708
lines changed

8 files changed

+720
-708
lines changed

google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClient.java

Lines changed: 329 additions & 329 deletions
Large diffs are not rendered by default.

google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceSettings.java

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@
5353
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
5454
* build() is called, the tree of builders is called to create the complete settings object.
5555
*
56-
* <p>For example, to set the total timeout of deleteTransferConfig to 30 seconds:
56+
* <p>For example, to set the total timeout of getDataSource to 30 seconds:
5757
*
5858
* <pre>
5959
* <code>
6060
* DataTransferServiceSettings.Builder dataTransferServiceSettingsBuilder =
6161
* DataTransferServiceSettings.newBuilder();
6262
* dataTransferServiceSettingsBuilder
63-
* .deleteTransferConfigSettings()
63+
* .getDataSourceSettings()
6464
* .setRetrySettings(
65-
* dataTransferServiceSettingsBuilder.deleteTransferConfigSettings().getRetrySettings().toBuilder()
65+
* dataTransferServiceSettingsBuilder.getDataSourceSettings().getRetrySettings().toBuilder()
6666
* .setTotalTimeout(Duration.ofSeconds(30))
6767
* .build());
6868
* DataTransferServiceSettings dataTransferServiceSettings = dataTransferServiceSettingsBuilder.build();
@@ -72,22 +72,6 @@
7272
@Generated("by gapic-generator")
7373
@BetaApi
7474
public class DataTransferServiceSettings extends ClientSettings<DataTransferServiceSettings> {
75-
/** Returns the object with the settings used for calls to deleteTransferConfig. */
76-
public UnaryCallSettings<DeleteTransferConfigRequest, Empty> deleteTransferConfigSettings() {
77-
return ((DataTransferServiceStubSettings) getStubSettings()).deleteTransferConfigSettings();
78-
}
79-
80-
/** Returns the object with the settings used for calls to deleteTransferRun. */
81-
public UnaryCallSettings<DeleteTransferRunRequest, Empty> deleteTransferRunSettings() {
82-
return ((DataTransferServiceStubSettings) getStubSettings()).deleteTransferRunSettings();
83-
}
84-
85-
/** Returns the object with the settings used for calls to checkValidCreds. */
86-
public UnaryCallSettings<CheckValidCredsRequest, CheckValidCredsResponse>
87-
checkValidCredsSettings() {
88-
return ((DataTransferServiceStubSettings) getStubSettings()).checkValidCredsSettings();
89-
}
90-
9175
/** Returns the object with the settings used for calls to getDataSource. */
9276
public UnaryCallSettings<GetDataSourceRequest, DataSource> getDataSourceSettings() {
9377
return ((DataTransferServiceStubSettings) getStubSettings()).getDataSourceSettings();
@@ -112,6 +96,11 @@ public UnaryCallSettings<GetDataSourceRequest, DataSource> getDataSourceSettings
11296
return ((DataTransferServiceStubSettings) getStubSettings()).updateTransferConfigSettings();
11397
}
11498

99+
/** Returns the object with the settings used for calls to deleteTransferConfig. */
100+
public UnaryCallSettings<DeleteTransferConfigRequest, Empty> deleteTransferConfigSettings() {
101+
return ((DataTransferServiceStubSettings) getStubSettings()).deleteTransferConfigSettings();
102+
}
103+
115104
/** Returns the object with the settings used for calls to getTransferConfig. */
116105
public UnaryCallSettings<GetTransferConfigRequest, TransferConfig> getTransferConfigSettings() {
117106
return ((DataTransferServiceStubSettings) getStubSettings()).getTransferConfigSettings();
@@ -141,6 +130,11 @@ public UnaryCallSettings<GetTransferRunRequest, TransferRun> getTransferRunSetti
141130
return ((DataTransferServiceStubSettings) getStubSettings()).getTransferRunSettings();
142131
}
143132

133+
/** Returns the object with the settings used for calls to deleteTransferRun. */
134+
public UnaryCallSettings<DeleteTransferRunRequest, Empty> deleteTransferRunSettings() {
135+
return ((DataTransferServiceStubSettings) getStubSettings()).deleteTransferRunSettings();
136+
}
137+
144138
/** Returns the object with the settings used for calls to listTransferRuns. */
145139
public PagedCallSettings<
146140
ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse>
@@ -155,6 +149,12 @@ public UnaryCallSettings<GetTransferRunRequest, TransferRun> getTransferRunSetti
155149
return ((DataTransferServiceStubSettings) getStubSettings()).listTransferLogsSettings();
156150
}
157151

152+
/** Returns the object with the settings used for calls to checkValidCreds. */
153+
public UnaryCallSettings<CheckValidCredsRequest, CheckValidCredsResponse>
154+
checkValidCredsSettings() {
155+
return ((DataTransferServiceStubSettings) getStubSettings()).checkValidCredsSettings();
156+
}
157+
158158
public static final DataTransferServiceSettings create(DataTransferServiceStubSettings stub)
159159
throws IOException {
160160
return new DataTransferServiceSettings.Builder(stub.toBuilder()).build();
@@ -252,23 +252,6 @@ public Builder applyToAllUnaryMethods(
252252
return this;
253253
}
254254

255-
/** Returns the builder for the settings used for calls to deleteTransferConfig. */
256-
public UnaryCallSettings.Builder<DeleteTransferConfigRequest, Empty>
257-
deleteTransferConfigSettings() {
258-
return getStubSettingsBuilder().deleteTransferConfigSettings();
259-
}
260-
261-
/** Returns the builder for the settings used for calls to deleteTransferRun. */
262-
public UnaryCallSettings.Builder<DeleteTransferRunRequest, Empty> deleteTransferRunSettings() {
263-
return getStubSettingsBuilder().deleteTransferRunSettings();
264-
}
265-
266-
/** Returns the builder for the settings used for calls to checkValidCreds. */
267-
public UnaryCallSettings.Builder<CheckValidCredsRequest, CheckValidCredsResponse>
268-
checkValidCredsSettings() {
269-
return getStubSettingsBuilder().checkValidCredsSettings();
270-
}
271-
272255
/** Returns the builder for the settings used for calls to getDataSource. */
273256
public UnaryCallSettings.Builder<GetDataSourceRequest, DataSource> getDataSourceSettings() {
274257
return getStubSettingsBuilder().getDataSourceSettings();
@@ -293,6 +276,12 @@ public UnaryCallSettings.Builder<GetDataSourceRequest, DataSource> getDataSource
293276
return getStubSettingsBuilder().updateTransferConfigSettings();
294277
}
295278

279+
/** Returns the builder for the settings used for calls to deleteTransferConfig. */
280+
public UnaryCallSettings.Builder<DeleteTransferConfigRequest, Empty>
281+
deleteTransferConfigSettings() {
282+
return getStubSettingsBuilder().deleteTransferConfigSettings();
283+
}
284+
296285
/** Returns the builder for the settings used for calls to getTransferConfig. */
297286
public UnaryCallSettings.Builder<GetTransferConfigRequest, TransferConfig>
298287
getTransferConfigSettings() {
@@ -326,6 +315,11 @@ public UnaryCallSettings.Builder<GetTransferRunRequest, TransferRun> getTransfer
326315
return getStubSettingsBuilder().getTransferRunSettings();
327316
}
328317

318+
/** Returns the builder for the settings used for calls to deleteTransferRun. */
319+
public UnaryCallSettings.Builder<DeleteTransferRunRequest, Empty> deleteTransferRunSettings() {
320+
return getStubSettingsBuilder().deleteTransferRunSettings();
321+
}
322+
329323
/** Returns the builder for the settings used for calls to listTransferRuns. */
330324
public PagedCallSettings.Builder<
331325
ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse>
@@ -340,6 +334,12 @@ public UnaryCallSettings.Builder<GetTransferRunRequest, TransferRun> getTransfer
340334
return getStubSettingsBuilder().listTransferLogsSettings();
341335
}
342336

337+
/** Returns the builder for the settings used for calls to checkValidCreds. */
338+
public UnaryCallSettings.Builder<CheckValidCredsRequest, CheckValidCredsResponse>
339+
checkValidCredsSettings() {
340+
return getStubSettingsBuilder().checkValidCredsSettings();
341+
}
342+
343343
@Override
344344
public DataTransferServiceSettings build() throws IOException {
345345
return new DataTransferServiceSettings(this);

google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/package-info.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
* <pre>
3131
* <code>
3232
* try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
33-
* TransferConfigName name = TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]");
34-
* dataTransferServiceClient.deleteTransferConfig(name);
33+
* DataSourceName name = DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]");
34+
* DataSource response = dataTransferServiceClient.getDataSource(name);
3535
* }
3636
* </code>
3737
* </pre>

google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/DataTransferServiceStub.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,6 @@
6060
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
6161
public abstract class DataTransferServiceStub implements BackgroundResource {
6262

63-
public UnaryCallable<DeleteTransferConfigRequest, Empty> deleteTransferConfigCallable() {
64-
throw new UnsupportedOperationException("Not implemented: deleteTransferConfigCallable()");
65-
}
66-
67-
public UnaryCallable<DeleteTransferRunRequest, Empty> deleteTransferRunCallable() {
68-
throw new UnsupportedOperationException("Not implemented: deleteTransferRunCallable()");
69-
}
70-
71-
public UnaryCallable<CheckValidCredsRequest, CheckValidCredsResponse> checkValidCredsCallable() {
72-
throw new UnsupportedOperationException("Not implemented: checkValidCredsCallable()");
73-
}
74-
7563
public UnaryCallable<GetDataSourceRequest, DataSource> getDataSourceCallable() {
7664
throw new UnsupportedOperationException("Not implemented: getDataSourceCallable()");
7765
}
@@ -93,6 +81,10 @@ public UnaryCallable<UpdateTransferConfigRequest, TransferConfig> updateTransfer
9381
throw new UnsupportedOperationException("Not implemented: updateTransferConfigCallable()");
9482
}
9583

84+
public UnaryCallable<DeleteTransferConfigRequest, Empty> deleteTransferConfigCallable() {
85+
throw new UnsupportedOperationException("Not implemented: deleteTransferConfigCallable()");
86+
}
87+
9688
public UnaryCallable<GetTransferConfigRequest, TransferConfig> getTransferConfigCallable() {
9789
throw new UnsupportedOperationException("Not implemented: getTransferConfigCallable()");
9890
}
@@ -121,6 +113,10 @@ public UnaryCallable<GetTransferRunRequest, TransferRun> getTransferRunCallable(
121113
throw new UnsupportedOperationException("Not implemented: getTransferRunCallable()");
122114
}
123115

116+
public UnaryCallable<DeleteTransferRunRequest, Empty> deleteTransferRunCallable() {
117+
throw new UnsupportedOperationException("Not implemented: deleteTransferRunCallable()");
118+
}
119+
124120
public UnaryCallable<ListTransferRunsRequest, ListTransferRunsPagedResponse>
125121
listTransferRunsPagedCallable() {
126122
throw new UnsupportedOperationException("Not implemented: listTransferRunsPagedCallable()");
@@ -141,6 +137,10 @@ public UnaryCallable<GetTransferRunRequest, TransferRun> getTransferRunCallable(
141137
throw new UnsupportedOperationException("Not implemented: listTransferLogsCallable()");
142138
}
143139

140+
public UnaryCallable<CheckValidCredsRequest, CheckValidCredsResponse> checkValidCredsCallable() {
141+
throw new UnsupportedOperationException("Not implemented: checkValidCredsCallable()");
142+
}
143+
144144
@Override
145145
public abstract void close();
146146
}

0 commit comments

Comments
 (0)