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

Commit 64a92be

Browse files
fix: restore GAPIC v2 retry configs (#166)
Restores GAPIC v2 retry config overrides that were mistakenly removed during migration. PiperOrigin-RevId: 312088359 Source-Author: Google APIs <noreply@google.com> Source-Date: Mon May 18 08:57:12 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 5a90d467aa65e7f038f87585e8fbb45d74475e7c Source-Link: googleapis/googleapis@5a90d46
1 parent cc1b752 commit 64a92be

File tree

8 files changed

+681
-681
lines changed

8 files changed

+681
-681
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 getDataSource to 30 seconds:
56+
* <p>For example, to set the total timeout of deleteTransferConfig to 30 seconds:
5757
*
5858
* <pre>
5959
* <code>
6060
* DataTransferServiceSettings.Builder dataTransferServiceSettingsBuilder =
6161
* DataTransferServiceSettings.newBuilder();
6262
* dataTransferServiceSettingsBuilder
63-
* .getDataSourceSettings()
63+
* .deleteTransferConfigSettings()
6464
* .setRetrySettings(
65-
* dataTransferServiceSettingsBuilder.getDataSourceSettings().getRetrySettings().toBuilder()
65+
* dataTransferServiceSettingsBuilder.deleteTransferConfigSettings().getRetrySettings().toBuilder()
6666
* .setTotalTimeout(Duration.ofSeconds(30))
6767
* .build());
6868
* DataTransferServiceSettings dataTransferServiceSettings = dataTransferServiceSettingsBuilder.build();
@@ -72,6 +72,22 @@
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+
7591
/** Returns the object with the settings used for calls to getDataSource. */
7692
public UnaryCallSettings<GetDataSourceRequest, DataSource> getDataSourceSettings() {
7793
return ((DataTransferServiceStubSettings) getStubSettings()).getDataSourceSettings();
@@ -96,11 +112,6 @@ public UnaryCallSettings<GetDataSourceRequest, DataSource> getDataSourceSettings
96112
return ((DataTransferServiceStubSettings) getStubSettings()).updateTransferConfigSettings();
97113
}
98114

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-
104115
/** Returns the object with the settings used for calls to getTransferConfig. */
105116
public UnaryCallSettings<GetTransferConfigRequest, TransferConfig> getTransferConfigSettings() {
106117
return ((DataTransferServiceStubSettings) getStubSettings()).getTransferConfigSettings();
@@ -130,11 +141,6 @@ public UnaryCallSettings<GetTransferRunRequest, TransferRun> getTransferRunSetti
130141
return ((DataTransferServiceStubSettings) getStubSettings()).getTransferRunSettings();
131142
}
132143

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-
138144
/** Returns the object with the settings used for calls to listTransferRuns. */
139145
public PagedCallSettings<
140146
ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse>
@@ -149,12 +155,6 @@ public UnaryCallSettings<DeleteTransferRunRequest, Empty> deleteTransferRunSetti
149155
return ((DataTransferServiceStubSettings) getStubSettings()).listTransferLogsSettings();
150156
}
151157

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,6 +252,23 @@ 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+
255272
/** Returns the builder for the settings used for calls to getDataSource. */
256273
public UnaryCallSettings.Builder<GetDataSourceRequest, DataSource> getDataSourceSettings() {
257274
return getStubSettingsBuilder().getDataSourceSettings();
@@ -276,12 +293,6 @@ public UnaryCallSettings.Builder<GetDataSourceRequest, DataSource> getDataSource
276293
return getStubSettingsBuilder().updateTransferConfigSettings();
277294
}
278295

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-
285296
/** Returns the builder for the settings used for calls to getTransferConfig. */
286297
public UnaryCallSettings.Builder<GetTransferConfigRequest, TransferConfig>
287298
getTransferConfigSettings() {
@@ -315,11 +326,6 @@ public UnaryCallSettings.Builder<GetTransferRunRequest, TransferRun> getTransfer
315326
return getStubSettingsBuilder().getTransferRunSettings();
316327
}
317328

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-
323329
/** Returns the builder for the settings used for calls to listTransferRuns. */
324330
public PagedCallSettings.Builder<
325331
ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse>
@@ -334,12 +340,6 @@ public UnaryCallSettings.Builder<DeleteTransferRunRequest, Empty> deleteTransfer
334340
return getStubSettingsBuilder().listTransferLogsSettings();
335341
}
336342

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-
* DataSourceName name = DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]");
34-
* DataSource response = dataTransferServiceClient.getDataSource(name);
33+
* TransferConfigName name = TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]");
34+
* dataTransferServiceClient.deleteTransferConfig(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,6 +60,18 @@
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+
6375
public UnaryCallable<GetDataSourceRequest, DataSource> getDataSourceCallable() {
6476
throw new UnsupportedOperationException("Not implemented: getDataSourceCallable()");
6577
}
@@ -81,10 +93,6 @@ public UnaryCallable<UpdateTransferConfigRequest, TransferConfig> updateTransfer
8193
throw new UnsupportedOperationException("Not implemented: updateTransferConfigCallable()");
8294
}
8395

84-
public UnaryCallable<DeleteTransferConfigRequest, Empty> deleteTransferConfigCallable() {
85-
throw new UnsupportedOperationException("Not implemented: deleteTransferConfigCallable()");
86-
}
87-
8896
public UnaryCallable<GetTransferConfigRequest, TransferConfig> getTransferConfigCallable() {
8997
throw new UnsupportedOperationException("Not implemented: getTransferConfigCallable()");
9098
}
@@ -113,10 +121,6 @@ public UnaryCallable<GetTransferRunRequest, TransferRun> getTransferRunCallable(
113121
throw new UnsupportedOperationException("Not implemented: getTransferRunCallable()");
114122
}
115123

116-
public UnaryCallable<DeleteTransferRunRequest, Empty> deleteTransferRunCallable() {
117-
throw new UnsupportedOperationException("Not implemented: deleteTransferRunCallable()");
118-
}
119-
120124
public UnaryCallable<ListTransferRunsRequest, ListTransferRunsPagedResponse>
121125
listTransferRunsPagedCallable() {
122126
throw new UnsupportedOperationException("Not implemented: listTransferRunsPagedCallable()");
@@ -137,10 +141,6 @@ public UnaryCallable<DeleteTransferRunRequest, Empty> deleteTransferRunCallable(
137141
throw new UnsupportedOperationException("Not implemented: listTransferLogsCallable()");
138142
}
139143

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)