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

Commit

Permalink
feat: add owner email to TransferConfig message feat: allow customer …
Browse files Browse the repository at this point in the history
…to enroll a datasource programmatically docs: improvements to various message and field descriptions (#1199)

* feat: add owner email to TransferConfig message feat: allow customer to enroll a datasource programmatically docs: improvements to various message and field descriptions

PiperOrigin-RevId: 422838555

Source-Link: googleapis/googleapis@63be77c

Source-Link: googleapis/googleapis-gen@57a7489
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTdhNzQ4OTIzOWE4MTk4NzYxZTBhYmM1OTI4NWE0YTY0ODAyMTEzOSJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jan 19, 2022
1 parent 2664b52 commit b1e4595
Show file tree
Hide file tree
Showing 24 changed files with 2,883 additions and 356 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Service Description: The Google BigQuery Data Transfer Service API enables BigQuery users to
* configure the transfer of their data from other Google Products into BigQuery. This service
* contains methods that are end user exposed. It backs up the frontend.
* Service Description: This API allows users to manage their data transfers into BigQuery.
*
* <p>This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
Expand Down Expand Up @@ -156,7 +154,7 @@ public DataTransferServiceStub getStub() {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves a supported data source and returns its settings, which can be used for UI rendering.
* Retrieves a supported data source and returns its settings.
*
* <p>Sample code:
*
Expand All @@ -180,7 +178,7 @@ public final DataSource getDataSource(DataSourceName name) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves a supported data source and returns its settings, which can be used for UI rendering.
* Retrieves a supported data source and returns its settings.
*
* <p>Sample code:
*
Expand All @@ -203,7 +201,7 @@ public final DataSource getDataSource(String name) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves a supported data source and returns its settings, which can be used for UI rendering.
* Retrieves a supported data source and returns its settings.
*
* <p>Sample code:
*
Expand All @@ -227,7 +225,7 @@ public final DataSource getDataSource(GetDataSourceRequest request) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves a supported data source and returns its settings, which can be used for UI rendering.
* Retrieves a supported data source and returns its settings.
*
* <p>Sample code:
*
Expand All @@ -251,7 +249,7 @@ public final UnaryCallable<GetDataSourceRequest, DataSource> getDataSourceCallab

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists supported data sources and returns their settings, which can be used for UI rendering.
* Lists supported data sources and returns their settings.
*
* <p>Sample code:
*
Expand All @@ -278,7 +276,7 @@ public final ListDataSourcesPagedResponse listDataSources(LocationName parent) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists supported data sources and returns their settings, which can be used for UI rendering.
* Lists supported data sources and returns their settings.
*
* <p>Sample code:
*
Expand All @@ -305,7 +303,7 @@ public final ListDataSourcesPagedResponse listDataSources(ProjectName parent) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists supported data sources and returns their settings, which can be used for UI rendering.
* Lists supported data sources and returns their settings.
*
* <p>Sample code:
*
Expand All @@ -329,7 +327,7 @@ public final ListDataSourcesPagedResponse listDataSources(String parent) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists supported data sources and returns their settings, which can be used for UI rendering.
* Lists supported data sources and returns their settings.
*
* <p>Sample code:
*
Expand All @@ -356,7 +354,7 @@ public final ListDataSourcesPagedResponse listDataSources(ListDataSourcesRequest

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists supported data sources and returns their settings, which can be used for UI rendering.
* Lists supported data sources and returns their settings.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -384,7 +382,7 @@ public final ListDataSourcesPagedResponse listDataSources(ListDataSourcesRequest

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists supported data sources and returns their settings, which can be used for UI rendering.
* Lists supported data sources and returns their settings.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1447,7 +1445,7 @@ public final UnaryCallable<DeleteTransferRunRequest, Empty> deleteTransferRunCal

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns information about running and completed jobs.
* Returns information about running and completed transfer runs.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1477,7 +1475,7 @@ public final ListTransferRunsPagedResponse listTransferRuns(TransferConfigName p

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns information about running and completed jobs.
* Returns information about running and completed transfer runs.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1506,7 +1504,7 @@ public final ListTransferRunsPagedResponse listTransferRuns(String parent) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns information about running and completed jobs.
* Returns information about running and completed transfer runs.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1536,7 +1534,7 @@ public final ListTransferRunsPagedResponse listTransferRuns(ListTransferRunsRequ

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns information about running and completed jobs.
* Returns information about running and completed transfer runs.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1567,7 +1565,7 @@ public final ListTransferRunsPagedResponse listTransferRuns(ListTransferRunsRequ

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns information about running and completed jobs.
* Returns information about running and completed transfer runs.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1605,7 +1603,7 @@ public final ListTransferRunsPagedResponse listTransferRuns(ListTransferRunsRequ

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns user facing log messages for the data transfer run.
* Returns log messages for the transfer run.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1635,7 +1633,7 @@ public final ListTransferLogsPagedResponse listTransferLogs(RunName parent) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns user facing log messages for the data transfer run.
* Returns log messages for the transfer run.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1664,7 +1662,7 @@ public final ListTransferLogsPagedResponse listTransferLogs(String parent) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns user facing log messages for the data transfer run.
* Returns log messages for the transfer run.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1695,7 +1693,7 @@ public final ListTransferLogsPagedResponse listTransferLogs(ListTransferLogsRequ

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns user facing log messages for the data transfer run.
* Returns log messages for the transfer run.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1726,7 +1724,7 @@ public final ListTransferLogsPagedResponse listTransferLogs(ListTransferLogsRequ

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns user facing log messages for the data transfer run.
* Returns log messages for the transfer run.
*
* <p>Sample code:
*
Expand Down Expand Up @@ -1764,10 +1762,7 @@ public final ListTransferLogsPagedResponse listTransferLogs(ListTransferLogsRequ

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns true if valid credentials exist for the given data source and requesting user. Some
* data sources doesn't support service account, so we need to talk to them on behalf of the end
* user. This API just checks whether we have OAuth token for the particular user, which is a
* pre-requisite before user can create a transfer config.
* Returns true if valid credentials exist for the given data source and requesting user.
*
* <p>Sample code:
*
Expand All @@ -1791,10 +1786,7 @@ public final CheckValidCredsResponse checkValidCreds(DataSourceName name) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns true if valid credentials exist for the given data source and requesting user. Some
* data sources doesn't support service account, so we need to talk to them on behalf of the end
* user. This API just checks whether we have OAuth token for the particular user, which is a
* pre-requisite before user can create a transfer config.
* Returns true if valid credentials exist for the given data source and requesting user.
*
* <p>Sample code:
*
Expand All @@ -1817,10 +1809,7 @@ public final CheckValidCredsResponse checkValidCreds(String name) {

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns true if valid credentials exist for the given data source and requesting user. Some
* data sources doesn't support service account, so we need to talk to them on behalf of the end
* user. This API just checks whether we have OAuth token for the particular user, which is a
* pre-requisite before user can create a transfer config.
* Returns true if valid credentials exist for the given data source and requesting user.
*
* <p>Sample code:
*
Expand All @@ -1844,10 +1833,7 @@ public final CheckValidCredsResponse checkValidCreds(CheckValidCredsRequest requ

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Returns true if valid credentials exist for the given data source and requesting user. Some
* data sources doesn't support service account, so we need to talk to them on behalf of the end
* user. This API just checks whether we have OAuth token for the particular user, which is a
* pre-requisite before user can create a transfer config.
* Returns true if valid credentials exist for the given data source and requesting user.
*
* <p>Sample code:
*
Expand All @@ -1870,6 +1856,62 @@ public final CheckValidCredsResponse checkValidCreds(CheckValidCredsRequest requ
return stub.checkValidCredsCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Enroll data sources in a user project. This allows users to create transfer configurations for
* these data sources. They will also appear in the ListDataSources RPC and as such, will appear
* in the BigQuery UI 'https://bigquery.cloud.google.com' (and the documents can be found at
* https://cloud.google.com/bigquery/bigquery-web-ui and
* https://cloud.google.com/bigquery/docs/working-with-transfers).
*
* <p>Sample code:
*
* <pre>{@code
* try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
* EnrollDataSourcesRequest request =
* EnrollDataSourcesRequest.newBuilder()
* .setName("name3373707")
* .addAllDataSourceIds(new ArrayList<String>())
* .build();
* dataTransferServiceClient.enrollDataSources(request);
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void enrollDataSources(EnrollDataSourcesRequest request) {
enrollDataSourcesCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Enroll data sources in a user project. This allows users to create transfer configurations for
* these data sources. They will also appear in the ListDataSources RPC and as such, will appear
* in the BigQuery UI 'https://bigquery.cloud.google.com' (and the documents can be found at
* https://cloud.google.com/bigquery/bigquery-web-ui and
* https://cloud.google.com/bigquery/docs/working-with-transfers).
*
* <p>Sample code:
*
* <pre>{@code
* try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
* EnrollDataSourcesRequest request =
* EnrollDataSourcesRequest.newBuilder()
* .setName("name3373707")
* .addAllDataSourceIds(new ArrayList<String>())
* .build();
* ApiFuture<Empty> future =
* dataTransferServiceClient.enrollDataSourcesCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }</pre>
*/
public final UnaryCallable<EnrollDataSourcesRequest, Empty> enrollDataSourcesCallable() {
return stub.enrollDataSourcesCallable();
}

@Override
public final void close() {
stub.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ public UnaryCallSettings<DeleteTransferRunRequest, Empty> deleteTransferRunSetti
return ((DataTransferServiceStubSettings) getStubSettings()).checkValidCredsSettings();
}

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

public static final DataTransferServiceSettings create(DataTransferServiceStubSettings stub)
throws IOException {
return new DataTransferServiceSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -353,6 +358,11 @@ public UnaryCallSettings.Builder<DeleteTransferRunRequest, Empty> deleteTransfer
return getStubSettingsBuilder().checkValidCredsSettings();
}

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

@Override
public DataTransferServiceSettings build() throws IOException {
return new DataTransferServiceSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"DeleteTransferRun": {
"methods": ["deleteTransferRun", "deleteTransferRun", "deleteTransferRun", "deleteTransferRunCallable"]
},
"EnrollDataSources": {
"methods": ["enrollDataSources", "enrollDataSourcesCallable"]
},
"GetDataSource": {
"methods": ["getDataSource", "getDataSource", "getDataSource", "getDataSourceCallable"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
*
* <p>======================= DataTransferServiceClient =======================
*
* <p>Service Description: The Google BigQuery Data Transfer Service API enables BigQuery users to
* configure the transfer of their data from other Google Products into BigQuery. This service
* contains methods that are end user exposed. It backs up the frontend.
* <p>Service Description: This API allows users to manage their data transfers into BigQuery.
*
* <p>Sample for DataTransferServiceClient:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.google.cloud.bigquery.datatransfer.v1.DataSource;
import com.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest;
import com.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest;
import com.google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest;
import com.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest;
import com.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest;
import com.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest;
Expand Down Expand Up @@ -141,6 +142,10 @@ public UnaryCallable<CheckValidCredsRequest, CheckValidCredsResponse> checkValid
throw new UnsupportedOperationException("Not implemented: checkValidCredsCallable()");
}

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

@Override
public abstract void close();
}
Loading

0 comments on commit b1e4595

Please sign in to comment.