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

Commit

Permalink
fix: restore GAPIC v2 retry configs (#166)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yoshi-automation committed May 18, 2020
1 parent cc1b752 commit 64a92be
Show file tree
Hide file tree
Showing 8 changed files with 681 additions and 681 deletions.

Large diffs are not rendered by default.

Expand Up @@ -53,16 +53,16 @@
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
* <p>For example, to set the total timeout of getDataSource to 30 seconds:
* <p>For example, to set the total timeout of deleteTransferConfig to 30 seconds:
*
* <pre>
* <code>
* DataTransferServiceSettings.Builder dataTransferServiceSettingsBuilder =
* DataTransferServiceSettings.newBuilder();
* dataTransferServiceSettingsBuilder
* .getDataSourceSettings()
* .deleteTransferConfigSettings()
* .setRetrySettings(
* dataTransferServiceSettingsBuilder.getDataSourceSettings().getRetrySettings().toBuilder()
* dataTransferServiceSettingsBuilder.deleteTransferConfigSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* DataTransferServiceSettings dataTransferServiceSettings = dataTransferServiceSettingsBuilder.build();
Expand All @@ -72,6 +72,22 @@
@Generated("by gapic-generator")
@BetaApi
public class DataTransferServiceSettings extends ClientSettings<DataTransferServiceSettings> {
/** Returns the object with the settings used for calls to deleteTransferConfig. */
public UnaryCallSettings<DeleteTransferConfigRequest, Empty> deleteTransferConfigSettings() {
return ((DataTransferServiceStubSettings) getStubSettings()).deleteTransferConfigSettings();
}

/** Returns the object with the settings used for calls to deleteTransferRun. */
public UnaryCallSettings<DeleteTransferRunRequest, Empty> deleteTransferRunSettings() {
return ((DataTransferServiceStubSettings) getStubSettings()).deleteTransferRunSettings();
}

/** Returns the object with the settings used for calls to checkValidCreds. */
public UnaryCallSettings<CheckValidCredsRequest, CheckValidCredsResponse>
checkValidCredsSettings() {
return ((DataTransferServiceStubSettings) getStubSettings()).checkValidCredsSettings();
}

/** Returns the object with the settings used for calls to getDataSource. */
public UnaryCallSettings<GetDataSourceRequest, DataSource> getDataSourceSettings() {
return ((DataTransferServiceStubSettings) getStubSettings()).getDataSourceSettings();
Expand All @@ -96,11 +112,6 @@ public UnaryCallSettings<GetDataSourceRequest, DataSource> getDataSourceSettings
return ((DataTransferServiceStubSettings) getStubSettings()).updateTransferConfigSettings();
}

/** Returns the object with the settings used for calls to deleteTransferConfig. */
public UnaryCallSettings<DeleteTransferConfigRequest, Empty> deleteTransferConfigSettings() {
return ((DataTransferServiceStubSettings) getStubSettings()).deleteTransferConfigSettings();
}

/** Returns the object with the settings used for calls to getTransferConfig. */
public UnaryCallSettings<GetTransferConfigRequest, TransferConfig> getTransferConfigSettings() {
return ((DataTransferServiceStubSettings) getStubSettings()).getTransferConfigSettings();
Expand Down Expand Up @@ -130,11 +141,6 @@ public UnaryCallSettings<GetTransferRunRequest, TransferRun> getTransferRunSetti
return ((DataTransferServiceStubSettings) getStubSettings()).getTransferRunSettings();
}

/** Returns the object with the settings used for calls to deleteTransferRun. */
public UnaryCallSettings<DeleteTransferRunRequest, Empty> deleteTransferRunSettings() {
return ((DataTransferServiceStubSettings) getStubSettings()).deleteTransferRunSettings();
}

/** Returns the object with the settings used for calls to listTransferRuns. */
public PagedCallSettings<
ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse>
Expand All @@ -149,12 +155,6 @@ public UnaryCallSettings<DeleteTransferRunRequest, Empty> deleteTransferRunSetti
return ((DataTransferServiceStubSettings) getStubSettings()).listTransferLogsSettings();
}

/** Returns the object with the settings used for calls to checkValidCreds. */
public UnaryCallSettings<CheckValidCredsRequest, CheckValidCredsResponse>
checkValidCredsSettings() {
return ((DataTransferServiceStubSettings) getStubSettings()).checkValidCredsSettings();
}

public static final DataTransferServiceSettings create(DataTransferServiceStubSettings stub)
throws IOException {
return new DataTransferServiceSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -252,6 +252,23 @@ public Builder applyToAllUnaryMethods(
return this;
}

/** Returns the builder for the settings used for calls to deleteTransferConfig. */
public UnaryCallSettings.Builder<DeleteTransferConfigRequest, Empty>
deleteTransferConfigSettings() {
return getStubSettingsBuilder().deleteTransferConfigSettings();
}

/** Returns the builder for the settings used for calls to deleteTransferRun. */
public UnaryCallSettings.Builder<DeleteTransferRunRequest, Empty> deleteTransferRunSettings() {
return getStubSettingsBuilder().deleteTransferRunSettings();
}

/** Returns the builder for the settings used for calls to checkValidCreds. */
public UnaryCallSettings.Builder<CheckValidCredsRequest, CheckValidCredsResponse>
checkValidCredsSettings() {
return getStubSettingsBuilder().checkValidCredsSettings();
}

/** Returns the builder for the settings used for calls to getDataSource. */
public UnaryCallSettings.Builder<GetDataSourceRequest, DataSource> getDataSourceSettings() {
return getStubSettingsBuilder().getDataSourceSettings();
Expand All @@ -276,12 +293,6 @@ public UnaryCallSettings.Builder<GetDataSourceRequest, DataSource> getDataSource
return getStubSettingsBuilder().updateTransferConfigSettings();
}

/** Returns the builder for the settings used for calls to deleteTransferConfig. */
public UnaryCallSettings.Builder<DeleteTransferConfigRequest, Empty>
deleteTransferConfigSettings() {
return getStubSettingsBuilder().deleteTransferConfigSettings();
}

/** Returns the builder for the settings used for calls to getTransferConfig. */
public UnaryCallSettings.Builder<GetTransferConfigRequest, TransferConfig>
getTransferConfigSettings() {
Expand Down Expand Up @@ -315,11 +326,6 @@ public UnaryCallSettings.Builder<GetTransferRunRequest, TransferRun> getTransfer
return getStubSettingsBuilder().getTransferRunSettings();
}

/** Returns the builder for the settings used for calls to deleteTransferRun. */
public UnaryCallSettings.Builder<DeleteTransferRunRequest, Empty> deleteTransferRunSettings() {
return getStubSettingsBuilder().deleteTransferRunSettings();
}

/** Returns the builder for the settings used for calls to listTransferRuns. */
public PagedCallSettings.Builder<
ListTransferRunsRequest, ListTransferRunsResponse, ListTransferRunsPagedResponse>
Expand All @@ -334,12 +340,6 @@ public UnaryCallSettings.Builder<DeleteTransferRunRequest, Empty> deleteTransfer
return getStubSettingsBuilder().listTransferLogsSettings();
}

/** Returns the builder for the settings used for calls to checkValidCreds. */
public UnaryCallSettings.Builder<CheckValidCredsRequest, CheckValidCredsResponse>
checkValidCredsSettings() {
return getStubSettingsBuilder().checkValidCredsSettings();
}

@Override
public DataTransferServiceSettings build() throws IOException {
return new DataTransferServiceSettings(this);
Expand Down
Expand Up @@ -30,8 +30,8 @@
* <pre>
* <code>
* try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
* DataSourceName name = DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]");
* DataSource response = dataTransferServiceClient.getDataSource(name);
* TransferConfigName name = TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]");
* dataTransferServiceClient.deleteTransferConfig(name);
* }
* </code>
* </pre>
Expand Down
Expand Up @@ -60,6 +60,18 @@
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public abstract class DataTransferServiceStub implements BackgroundResource {

public UnaryCallable<DeleteTransferConfigRequest, Empty> deleteTransferConfigCallable() {
throw new UnsupportedOperationException("Not implemented: deleteTransferConfigCallable()");
}

public UnaryCallable<DeleteTransferRunRequest, Empty> deleteTransferRunCallable() {
throw new UnsupportedOperationException("Not implemented: deleteTransferRunCallable()");
}

public UnaryCallable<CheckValidCredsRequest, CheckValidCredsResponse> checkValidCredsCallable() {
throw new UnsupportedOperationException("Not implemented: checkValidCredsCallable()");
}

public UnaryCallable<GetDataSourceRequest, DataSource> getDataSourceCallable() {
throw new UnsupportedOperationException("Not implemented: getDataSourceCallable()");
}
Expand All @@ -81,10 +93,6 @@ public UnaryCallable<UpdateTransferConfigRequest, TransferConfig> updateTransfer
throw new UnsupportedOperationException("Not implemented: updateTransferConfigCallable()");
}

public UnaryCallable<DeleteTransferConfigRequest, Empty> deleteTransferConfigCallable() {
throw new UnsupportedOperationException("Not implemented: deleteTransferConfigCallable()");
}

public UnaryCallable<GetTransferConfigRequest, TransferConfig> getTransferConfigCallable() {
throw new UnsupportedOperationException("Not implemented: getTransferConfigCallable()");
}
Expand Down Expand Up @@ -113,10 +121,6 @@ public UnaryCallable<GetTransferRunRequest, TransferRun> getTransferRunCallable(
throw new UnsupportedOperationException("Not implemented: getTransferRunCallable()");
}

public UnaryCallable<DeleteTransferRunRequest, Empty> deleteTransferRunCallable() {
throw new UnsupportedOperationException("Not implemented: deleteTransferRunCallable()");
}

public UnaryCallable<ListTransferRunsRequest, ListTransferRunsPagedResponse>
listTransferRunsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listTransferRunsPagedCallable()");
Expand All @@ -137,10 +141,6 @@ public UnaryCallable<DeleteTransferRunRequest, Empty> deleteTransferRunCallable(
throw new UnsupportedOperationException("Not implemented: listTransferLogsCallable()");
}

public UnaryCallable<CheckValidCredsRequest, CheckValidCredsResponse> checkValidCredsCallable() {
throw new UnsupportedOperationException("Not implemented: checkValidCredsCallable()");
}

@Override
public abstract void close();
}

0 comments on commit 64a92be

Please sign in to comment.