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

Commit b1e4595

Browse files
feat: add owner email to TransferConfig message feat: allow customer 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: https://github.com/googleapis/googleapis-gen/commit/57a7489239a8198761e0abc59285a4a648021139 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>
1 parent 2664b52 commit b1e4595

File tree

24 files changed

+2883
-356
lines changed

24 files changed

+2883
-356
lines changed

google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceClient.java

Lines changed: 81 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@
3838

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

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

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

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

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

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

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

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

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

357355
// AUTO-GENERATED DOCUMENTATION AND METHOD.
358356
/**
359-
* Lists supported data sources and returns their settings, which can be used for UI rendering.
357+
* Lists supported data sources and returns their settings.
360358
*
361359
* <p>Sample code:
362360
*
@@ -384,7 +382,7 @@ public final ListDataSourcesPagedResponse listDataSources(ListDataSourcesRequest
384382

385383
// AUTO-GENERATED DOCUMENTATION AND METHOD.
386384
/**
387-
* Lists supported data sources and returns their settings, which can be used for UI rendering.
385+
* Lists supported data sources and returns their settings.
388386
*
389387
* <p>Sample code:
390388
*
@@ -1447,7 +1445,7 @@ public final UnaryCallable<DeleteTransferRunRequest, Empty> deleteTransferRunCal
14471445

14481446
// AUTO-GENERATED DOCUMENTATION AND METHOD.
14491447
/**
1450-
* Returns information about running and completed jobs.
1448+
* Returns information about running and completed transfer runs.
14511449
*
14521450
* <p>Sample code:
14531451
*
@@ -1477,7 +1475,7 @@ public final ListTransferRunsPagedResponse listTransferRuns(TransferConfigName p
14771475

14781476
// AUTO-GENERATED DOCUMENTATION AND METHOD.
14791477
/**
1480-
* Returns information about running and completed jobs.
1478+
* Returns information about running and completed transfer runs.
14811479
*
14821480
* <p>Sample code:
14831481
*
@@ -1506,7 +1504,7 @@ public final ListTransferRunsPagedResponse listTransferRuns(String parent) {
15061504

15071505
// AUTO-GENERATED DOCUMENTATION AND METHOD.
15081506
/**
1509-
* Returns information about running and completed jobs.
1507+
* Returns information about running and completed transfer runs.
15101508
*
15111509
* <p>Sample code:
15121510
*
@@ -1536,7 +1534,7 @@ public final ListTransferRunsPagedResponse listTransferRuns(ListTransferRunsRequ
15361534

15371535
// AUTO-GENERATED DOCUMENTATION AND METHOD.
15381536
/**
1539-
* Returns information about running and completed jobs.
1537+
* Returns information about running and completed transfer runs.
15401538
*
15411539
* <p>Sample code:
15421540
*
@@ -1567,7 +1565,7 @@ public final ListTransferRunsPagedResponse listTransferRuns(ListTransferRunsRequ
15671565

15681566
// AUTO-GENERATED DOCUMENTATION AND METHOD.
15691567
/**
1570-
* Returns information about running and completed jobs.
1568+
* Returns information about running and completed transfer runs.
15711569
*
15721570
* <p>Sample code:
15731571
*
@@ -1605,7 +1603,7 @@ public final ListTransferRunsPagedResponse listTransferRuns(ListTransferRunsRequ
16051603

16061604
// AUTO-GENERATED DOCUMENTATION AND METHOD.
16071605
/**
1608-
* Returns user facing log messages for the data transfer run.
1606+
* Returns log messages for the transfer run.
16091607
*
16101608
* <p>Sample code:
16111609
*
@@ -1635,7 +1633,7 @@ public final ListTransferLogsPagedResponse listTransferLogs(RunName parent) {
16351633

16361634
// AUTO-GENERATED DOCUMENTATION AND METHOD.
16371635
/**
1638-
* Returns user facing log messages for the data transfer run.
1636+
* Returns log messages for the transfer run.
16391637
*
16401638
* <p>Sample code:
16411639
*
@@ -1664,7 +1662,7 @@ public final ListTransferLogsPagedResponse listTransferLogs(String parent) {
16641662

16651663
// AUTO-GENERATED DOCUMENTATION AND METHOD.
16661664
/**
1667-
* Returns user facing log messages for the data transfer run.
1665+
* Returns log messages for the transfer run.
16681666
*
16691667
* <p>Sample code:
16701668
*
@@ -1695,7 +1693,7 @@ public final ListTransferLogsPagedResponse listTransferLogs(ListTransferLogsRequ
16951693

16961694
// AUTO-GENERATED DOCUMENTATION AND METHOD.
16971695
/**
1698-
* Returns user facing log messages for the data transfer run.
1696+
* Returns log messages for the transfer run.
16991697
*
17001698
* <p>Sample code:
17011699
*
@@ -1726,7 +1724,7 @@ public final ListTransferLogsPagedResponse listTransferLogs(ListTransferLogsRequ
17261724

17271725
// AUTO-GENERATED DOCUMENTATION AND METHOD.
17281726
/**
1729-
* Returns user facing log messages for the data transfer run.
1727+
* Returns log messages for the transfer run.
17301728
*
17311729
* <p>Sample code:
17321730
*
@@ -1764,10 +1762,7 @@ public final ListTransferLogsPagedResponse listTransferLogs(ListTransferLogsRequ
17641762

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

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

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

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

1859+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1860+
/**
1861+
* Enroll data sources in a user project. This allows users to create transfer configurations for
1862+
* these data sources. They will also appear in the ListDataSources RPC and as such, will appear
1863+
* in the BigQuery UI 'https://bigquery.cloud.google.com' (and the documents can be found at
1864+
* https://cloud.google.com/bigquery/bigquery-web-ui and
1865+
* https://cloud.google.com/bigquery/docs/working-with-transfers).
1866+
*
1867+
* <p>Sample code:
1868+
*
1869+
* <pre>{@code
1870+
* try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
1871+
* EnrollDataSourcesRequest request =
1872+
* EnrollDataSourcesRequest.newBuilder()
1873+
* .setName("name3373707")
1874+
* .addAllDataSourceIds(new ArrayList<String>())
1875+
* .build();
1876+
* dataTransferServiceClient.enrollDataSources(request);
1877+
* }
1878+
* }</pre>
1879+
*
1880+
* @param request The request object containing all of the parameters for the API call.
1881+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1882+
*/
1883+
public final void enrollDataSources(EnrollDataSourcesRequest request) {
1884+
enrollDataSourcesCallable().call(request);
1885+
}
1886+
1887+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1888+
/**
1889+
* Enroll data sources in a user project. This allows users to create transfer configurations for
1890+
* these data sources. They will also appear in the ListDataSources RPC and as such, will appear
1891+
* in the BigQuery UI 'https://bigquery.cloud.google.com' (and the documents can be found at
1892+
* https://cloud.google.com/bigquery/bigquery-web-ui and
1893+
* https://cloud.google.com/bigquery/docs/working-with-transfers).
1894+
*
1895+
* <p>Sample code:
1896+
*
1897+
* <pre>{@code
1898+
* try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
1899+
* EnrollDataSourcesRequest request =
1900+
* EnrollDataSourcesRequest.newBuilder()
1901+
* .setName("name3373707")
1902+
* .addAllDataSourceIds(new ArrayList<String>())
1903+
* .build();
1904+
* ApiFuture<Empty> future =
1905+
* dataTransferServiceClient.enrollDataSourcesCallable().futureCall(request);
1906+
* // Do something.
1907+
* future.get();
1908+
* }
1909+
* }</pre>
1910+
*/
1911+
public final UnaryCallable<EnrollDataSourcesRequest, Empty> enrollDataSourcesCallable() {
1912+
return stub.enrollDataSourcesCallable();
1913+
}
1914+
18731915
@Override
18741916
public final void close() {
18751917
stub.close();

google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/DataTransferServiceSettings.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ public UnaryCallSettings<DeleteTransferRunRequest, Empty> deleteTransferRunSetti
163163
return ((DataTransferServiceStubSettings) getStubSettings()).checkValidCredsSettings();
164164
}
165165

166+
/** Returns the object with the settings used for calls to enrollDataSources. */
167+
public UnaryCallSettings<EnrollDataSourcesRequest, Empty> enrollDataSourcesSettings() {
168+
return ((DataTransferServiceStubSettings) getStubSettings()).enrollDataSourcesSettings();
169+
}
170+
166171
public static final DataTransferServiceSettings create(DataTransferServiceStubSettings stub)
167172
throws IOException {
168173
return new DataTransferServiceSettings.Builder(stub.toBuilder()).build();
@@ -353,6 +358,11 @@ public UnaryCallSettings.Builder<DeleteTransferRunRequest, Empty> deleteTransfer
353358
return getStubSettingsBuilder().checkValidCredsSettings();
354359
}
355360

361+
/** Returns the builder for the settings used for calls to enrollDataSources. */
362+
public UnaryCallSettings.Builder<EnrollDataSourcesRequest, Empty> enrollDataSourcesSettings() {
363+
return getStubSettingsBuilder().enrollDataSourcesSettings();
364+
}
365+
356366
@Override
357367
public DataTransferServiceSettings build() throws IOException {
358368
return new DataTransferServiceSettings(this);

google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/gapic_metadata.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
"DeleteTransferRun": {
2323
"methods": ["deleteTransferRun", "deleteTransferRun", "deleteTransferRun", "deleteTransferRunCallable"]
2424
},
25+
"EnrollDataSources": {
26+
"methods": ["enrollDataSources", "enrollDataSourcesCallable"]
27+
},
2528
"GetDataSource": {
2629
"methods": ["getDataSource", "getDataSource", "getDataSource", "getDataSourceCallable"]
2730
},

google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/package-info.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
*
2020
* <p>======================= DataTransferServiceClient =======================
2121
*
22-
* <p>Service Description: The Google BigQuery Data Transfer Service API enables BigQuery users to
23-
* configure the transfer of their data from other Google Products into BigQuery. This service
24-
* contains methods that are end user exposed. It backs up the frontend.
22+
* <p>Service Description: This API allows users to manage their data transfers into BigQuery.
2523
*
2624
* <p>Sample for DataTransferServiceClient:
2725
*

google-cloud-bigquerydatatransfer/src/main/java/com/google/cloud/bigquery/datatransfer/v1/stub/DataTransferServiceStub.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import com.google.cloud.bigquery.datatransfer.v1.DataSource;
3030
import com.google.cloud.bigquery.datatransfer.v1.DeleteTransferConfigRequest;
3131
import com.google.cloud.bigquery.datatransfer.v1.DeleteTransferRunRequest;
32+
import com.google.cloud.bigquery.datatransfer.v1.EnrollDataSourcesRequest;
3233
import com.google.cloud.bigquery.datatransfer.v1.GetDataSourceRequest;
3334
import com.google.cloud.bigquery.datatransfer.v1.GetTransferConfigRequest;
3435
import com.google.cloud.bigquery.datatransfer.v1.GetTransferRunRequest;
@@ -141,6 +142,10 @@ public UnaryCallable<CheckValidCredsRequest, CheckValidCredsResponse> checkValid
141142
throw new UnsupportedOperationException("Not implemented: checkValidCredsCallable()");
142143
}
143144

145+
public UnaryCallable<EnrollDataSourcesRequest, Empty> enrollDataSourcesCallable() {
146+
throw new UnsupportedOperationException("Not implemented: enrollDataSourcesCallable()");
147+
}
148+
144149
@Override
145150
public abstract void close();
146151
}

0 commit comments

Comments
 (0)