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

fix: migrate bq/datatransfer/v1 to grpc_service_config #239

Merged
merged 1 commit into from Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view

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 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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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>
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand All @@ -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() {
Expand Down Expand Up @@ -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>
Expand All @@ -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);
Expand Down
Expand Up @@ -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>
Expand Down
Expand Up @@ -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()");
}
Expand All @@ -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()");
}
Expand Down Expand Up @@ -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()");
Expand All @@ -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();
}