Skip to content
Permalink
Browse files
fix: migrate bq/datatransfer/v1 to grpc_service_config (#239)
PiperOrigin-RevId: 320218003

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Jul 8 10:38:55 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 8dd269fb6fc7635b7edd67403b89450e0cd450c9
Source-Link: googleapis/googleapis@8dd269f
  • Loading branch information
yoshi-automation committed Jul 9, 2020
1 parent 4f75d09 commit dd118521eea3c9c60dfae633995b4d522fab6086

Large diffs are not rendered by default.

@@ -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 deleteTransferConfig to 30 seconds:
* <p>For example, to set the total timeout of getDataSource to 30 seconds:
*
* <pre>
* <code>
* DataTransferServiceSettings.Builder dataTransferServiceSettingsBuilder =
* DataTransferServiceSettings.newBuilder();
* dataTransferServiceSettingsBuilder
* .deleteTransferConfigSettings()
* .getDataSourceSettings()
* .setRetrySettings(
* dataTransferServiceSettingsBuilder.deleteTransferConfigSettings().getRetrySettings().toBuilder()
* dataTransferServiceSettingsBuilder.getDataSourceSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* DataTransferServiceSettings dataTransferServiceSettings = dataTransferServiceSettingsBuilder.build();
@@ -72,22 +72,6 @@
@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();
@@ -112,6 +96,11 @@ 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();
@@ -141,6 +130,11 @@ 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>
@@ -155,6 +149,12 @@ public UnaryCallSettings<GetTransferRunRequest, TransferRun> getTransferRunSetti
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();
@@ -252,23 +252,6 @@ 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();
@@ -293,6 +276,12 @@ 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() {
@@ -326,6 +315,11 @@ 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>
@@ -340,6 +334,12 @@ public UnaryCallSettings.Builder<GetTransferRunRequest, TransferRun> getTransfer
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);
@@ -30,8 +30,8 @@
* <pre>
* <code>
* try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
* TransferConfigName name = TransferConfigName.ofProjectTransferConfigName("[PROJECT]", "[TRANSFER_CONFIG]");
* dataTransferServiceClient.deleteTransferConfig(name);
* DataSourceName name = DataSourceName.ofProjectDataSourceName("[PROJECT]", "[DATA_SOURCE]");
* DataSource response = dataTransferServiceClient.getDataSource(name);
* }
* </code>
* </pre>
@@ -60,18 +60,6 @@
@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()");
}
@@ -93,6 +81,10 @@ 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()");
}
@@ -121,6 +113,10 @@ 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()");
@@ -141,6 +137,10 @@ public UnaryCallable<GetTransferRunRequest, TransferRun> getTransferRunCallable(
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 dd11852

Please sign in to comment.