Skip to content

Commit 651ba65

Browse files
fix(deps): [bigquerydatatransfer] Update the Java code generator (gapic-generator-java) to 2.35.0 (#10362)
* feat: Add UnenrollDataSources API which gives users a programmatic way to unenroll data sources PiperOrigin-RevId: 606248188 Source-Link: googleapis/googleapis@fa4f91a Source-Link: https://github.com/googleapis/googleapis-gen/commit/05afb31332fb895dc0fd1b822ba50d49eebd3406 Copy-Tag: eyJwIjoiamF2YS1iaWdxdWVyeWRhdGF0cmFuc2Zlci8uT3dsQm90LnlhbWwiLCJoIjoiMDVhZmIzMTMzMmZiODk1ZGMwZmQxYjgyMmJhNTBkNDllZWJkMzQwNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix(deps): Update the Java code generator (gapic-generator-java) to 2.35.0 PiperOrigin-RevId: 606977988 Source-Link: googleapis/googleapis@0606cbc Source-Link: https://github.com/googleapis/googleapis-gen/commit/2f98a6f866a6780a3882b63e078bc64a1b7519a0 Copy-Tag: eyJwIjoiamF2YS1iaWdxdWVyeWRhdGF0cmFuc2Zlci8uT3dsQm90LnlhbWwiLCJoIjoiMmY5OGE2Zjg2NmE2NzgwYTM4ODJiNjNlMDc4YmM2NGExYjc1MTlhMCJ9 * 🦉 Updates from OwlBot post-processor 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 23bb18b commit 651ba65

104 files changed

Lines changed: 1872 additions & 225 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

java-bigquerydatatransfer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
195195
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
196196
[stability-image]: https://img.shields.io/badge/stability-stable-green
197197
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquerydatatransfer.svg
198-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerydatatransfer/2.34.0
198+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerydatatransfer/2.35.0
199199
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
200200
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
201201
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

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

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 Google LLC
2+
* Copyright 2024 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -353,6 +353,20 @@
353353
* </td>
354354
* </tr>
355355
* <tr>
356+
* <td><p> UnenrollDataSources</td>
357+
* <td><p> Unenroll data sources in a user project. This allows users to remove transfer configurations for these data sources. They will no longer appear in the ListDataSources RPC and will also no longer appear in the [BigQuery UI](https://console.cloud.google.com/bigquery).</td>
358+
* <td>
359+
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
360+
* <ul>
361+
* <li><p> unenrollDataSources(UnenrollDataSourcesRequest request)
362+
* </ul>
363+
* <p>Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.</p>
364+
* <ul>
365+
* <li><p> unenrollDataSourcesCallable()
366+
* </ul>
367+
* </td>
368+
* </tr>
369+
* <tr>
356370
* <td><p> ListLocations</td>
357371
* <td><p> Lists information about the supported locations for this service.</td>
358372
* <td>
@@ -2596,6 +2610,68 @@ public final UnaryCallable<EnrollDataSourcesRequest, Empty> enrollDataSourcesCal
25962610
return stub.enrollDataSourcesCallable();
25972611
}
25982612

2613+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
2614+
/**
2615+
* Unenroll data sources in a user project. This allows users to remove transfer configurations
2616+
* for these data sources. They will no longer appear in the ListDataSources RPC and will also no
2617+
* longer appear in the [BigQuery UI](https://console.cloud.google.com/bigquery).
2618+
*
2619+
* <p>Sample code:
2620+
*
2621+
* <pre>{@code
2622+
* // This snippet has been automatically generated and should be regarded as a code template only.
2623+
* // It will require modifications to work:
2624+
* // - It may require correct/in-range values for request initialization.
2625+
* // - It may require specifying regional endpoints when creating the service client as shown in
2626+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2627+
* try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
2628+
* UnenrollDataSourcesRequest request =
2629+
* UnenrollDataSourcesRequest.newBuilder()
2630+
* .setName("name3373707")
2631+
* .addAllDataSourceIds(new ArrayList<String>())
2632+
* .build();
2633+
* dataTransferServiceClient.unenrollDataSources(request);
2634+
* }
2635+
* }</pre>
2636+
*
2637+
* @param request The request object containing all of the parameters for the API call.
2638+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2639+
*/
2640+
public final void unenrollDataSources(UnenrollDataSourcesRequest request) {
2641+
unenrollDataSourcesCallable().call(request);
2642+
}
2643+
2644+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
2645+
/**
2646+
* Unenroll data sources in a user project. This allows users to remove transfer configurations
2647+
* for these data sources. They will no longer appear in the ListDataSources RPC and will also no
2648+
* longer appear in the [BigQuery UI](https://console.cloud.google.com/bigquery).
2649+
*
2650+
* <p>Sample code:
2651+
*
2652+
* <pre>{@code
2653+
* // This snippet has been automatically generated and should be regarded as a code template only.
2654+
* // It will require modifications to work:
2655+
* // - It may require correct/in-range values for request initialization.
2656+
* // - It may require specifying regional endpoints when creating the service client as shown in
2657+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2658+
* try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
2659+
* UnenrollDataSourcesRequest request =
2660+
* UnenrollDataSourcesRequest.newBuilder()
2661+
* .setName("name3373707")
2662+
* .addAllDataSourceIds(new ArrayList<String>())
2663+
* .build();
2664+
* ApiFuture<Empty> future =
2665+
* dataTransferServiceClient.unenrollDataSourcesCallable().futureCall(request);
2666+
* // Do something.
2667+
* future.get();
2668+
* }
2669+
* }</pre>
2670+
*/
2671+
public final UnaryCallable<UnenrollDataSourcesRequest, Empty> unenrollDataSourcesCallable() {
2672+
return stub.unenrollDataSourcesCallable();
2673+
}
2674+
25992675
// AUTO-GENERATED DOCUMENTATION AND METHOD.
26002676
/**
26012677
* Lists information about the supported locations for this service.

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 Google LLC
2+
* Copyright 2024 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -179,6 +179,11 @@ public UnaryCallSettings<EnrollDataSourcesRequest, Empty> enrollDataSourcesSetti
179179
return ((DataTransferServiceStubSettings) getStubSettings()).enrollDataSourcesSettings();
180180
}
181181

182+
/** Returns the object with the settings used for calls to unenrollDataSources. */
183+
public UnaryCallSettings<UnenrollDataSourcesRequest, Empty> unenrollDataSourcesSettings() {
184+
return ((DataTransferServiceStubSettings) getStubSettings()).unenrollDataSourcesSettings();
185+
}
186+
182187
/** Returns the object with the settings used for calls to listLocations. */
183188
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
184189
listLocationsSettings() {
@@ -231,7 +236,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
231236
return DataTransferServiceStubSettings.defaultTransportChannelProvider();
232237
}
233238

234-
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
235239
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
236240
return DataTransferServiceStubSettings.defaultApiClientHeaderProviderBuilder();
237241
}
@@ -403,6 +407,12 @@ public UnaryCallSettings.Builder<EnrollDataSourcesRequest, Empty> enrollDataSour
403407
return getStubSettingsBuilder().enrollDataSourcesSettings();
404408
}
405409

410+
/** Returns the builder for the settings used for calls to unenrollDataSources. */
411+
public UnaryCallSettings.Builder<UnenrollDataSourcesRequest, Empty>
412+
unenrollDataSourcesSettings() {
413+
return getStubSettingsBuilder().unenrollDataSourcesSettings();
414+
}
415+
406416
/** Returns the builder for the settings used for calls to listLocations. */
407417
public PagedCallSettings.Builder<
408418
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>

java-bigquerydatatransfer/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
@@ -58,6 +58,9 @@
5858
"StartManualTransferRuns": {
5959
"methods": ["startManualTransferRuns", "startManualTransferRunsCallable"]
6060
},
61+
"UnenrollDataSources": {
62+
"methods": ["unenrollDataSources", "unenrollDataSourcesCallable"]
63+
},
6164
"UpdateTransferConfig": {
6265
"methods": ["updateTransferConfig", "updateTransferConfig", "updateTransferConfigCallable"]
6366
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 Google LLC
2+
* Copyright 2024 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 Google LLC
2+
* Copyright 2024 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -48,6 +48,7 @@
4848
import com.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse;
4949
import com.google.cloud.bigquery.datatransfer.v1.TransferConfig;
5050
import com.google.cloud.bigquery.datatransfer.v1.TransferRun;
51+
import com.google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest;
5152
import com.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest;
5253
import com.google.cloud.location.GetLocationRequest;
5354
import com.google.cloud.location.ListLocationsRequest;
@@ -151,6 +152,10 @@ public UnaryCallable<EnrollDataSourcesRequest, Empty> enrollDataSourcesCallable(
151152
throw new UnsupportedOperationException("Not implemented: enrollDataSourcesCallable()");
152153
}
153154

155+
public UnaryCallable<UnenrollDataSourcesRequest, Empty> unenrollDataSourcesCallable() {
156+
throw new UnsupportedOperationException("Not implemented: unenrollDataSourcesCallable()");
157+
}
158+
154159
public UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
155160
listLocationsPagedCallable() {
156161
throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");

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

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 Google LLC
2+
* Copyright 2024 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -72,6 +72,7 @@
7272
import com.google.cloud.bigquery.datatransfer.v1.TransferConfig;
7373
import com.google.cloud.bigquery.datatransfer.v1.TransferMessage;
7474
import com.google.cloud.bigquery.datatransfer.v1.TransferRun;
75+
import com.google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest;
7576
import com.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest;
7677
import com.google.cloud.location.GetLocationRequest;
7778
import com.google.cloud.location.ListLocationsRequest;
@@ -161,6 +162,7 @@ public class DataTransferServiceStubSettings extends StubSettings<DataTransferSe
161162
private final UnaryCallSettings<CheckValidCredsRequest, CheckValidCredsResponse>
162163
checkValidCredsSettings;
163164
private final UnaryCallSettings<EnrollDataSourcesRequest, Empty> enrollDataSourcesSettings;
165+
private final UnaryCallSettings<UnenrollDataSourcesRequest, Empty> unenrollDataSourcesSettings;
164166
private final PagedCallSettings<
165167
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
166168
listLocationsSettings;
@@ -547,6 +549,11 @@ public UnaryCallSettings<EnrollDataSourcesRequest, Empty> enrollDataSourcesSetti
547549
return enrollDataSourcesSettings;
548550
}
549551

552+
/** Returns the object with the settings used for calls to unenrollDataSources. */
553+
public UnaryCallSettings<UnenrollDataSourcesRequest, Empty> unenrollDataSourcesSettings() {
554+
return unenrollDataSourcesSettings;
555+
}
556+
550557
/** Returns the object with the settings used for calls to listLocations. */
551558
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
552559
listLocationsSettings() {
@@ -633,7 +640,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
633640
return defaultGrpcTransportProviderBuilder().build();
634641
}
635642

636-
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
637643
public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
638644
return ApiClientHeaderProvider.newBuilder()
639645
.setGeneratedLibToken(
@@ -642,7 +648,6 @@ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProvider
642648
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
643649
}
644650

645-
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
646651
public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
647652
return ApiClientHeaderProvider.newBuilder()
648653
.setGeneratedLibToken(
@@ -694,6 +699,7 @@ protected DataTransferServiceStubSettings(Builder settingsBuilder) throws IOExce
694699
listTransferLogsSettings = settingsBuilder.listTransferLogsSettings().build();
695700
checkValidCredsSettings = settingsBuilder.checkValidCredsSettings().build();
696701
enrollDataSourcesSettings = settingsBuilder.enrollDataSourcesSettings().build();
702+
unenrollDataSourcesSettings = settingsBuilder.unenrollDataSourcesSettings().build();
697703
listLocationsSettings = settingsBuilder.listLocationsSettings().build();
698704
getLocationSettings = settingsBuilder.getLocationSettings().build();
699705
}
@@ -739,6 +745,8 @@ public static class Builder
739745
checkValidCredsSettings;
740746
private final UnaryCallSettings.Builder<EnrollDataSourcesRequest, Empty>
741747
enrollDataSourcesSettings;
748+
private final UnaryCallSettings.Builder<UnenrollDataSourcesRequest, Empty>
749+
unenrollDataSourcesSettings;
742750
private final PagedCallSettings.Builder<
743751
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
744752
listLocationsSettings;
@@ -812,6 +820,7 @@ protected Builder(ClientContext clientContext) {
812820
listTransferLogsSettings = PagedCallSettings.newBuilder(LIST_TRANSFER_LOGS_PAGE_STR_FACT);
813821
checkValidCredsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
814822
enrollDataSourcesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
823+
unenrollDataSourcesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
815824
listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT);
816825
getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
817826

@@ -832,6 +841,7 @@ protected Builder(ClientContext clientContext) {
832841
listTransferLogsSettings,
833842
checkValidCredsSettings,
834843
enrollDataSourcesSettings,
844+
unenrollDataSourcesSettings,
835845
listLocationsSettings,
836846
getLocationSettings);
837847
initDefaults(this);
@@ -855,6 +865,7 @@ protected Builder(DataTransferServiceStubSettings settings) {
855865
listTransferLogsSettings = settings.listTransferLogsSettings.toBuilder();
856866
checkValidCredsSettings = settings.checkValidCredsSettings.toBuilder();
857867
enrollDataSourcesSettings = settings.enrollDataSourcesSettings.toBuilder();
868+
unenrollDataSourcesSettings = settings.unenrollDataSourcesSettings.toBuilder();
858869
listLocationsSettings = settings.listLocationsSettings.toBuilder();
859870
getLocationSettings = settings.getLocationSettings.toBuilder();
860871

@@ -875,6 +886,7 @@ protected Builder(DataTransferServiceStubSettings settings) {
875886
listTransferLogsSettings,
876887
checkValidCredsSettings,
877888
enrollDataSourcesSettings,
889+
unenrollDataSourcesSettings,
878890
listLocationsSettings,
879891
getLocationSettings);
880892
}
@@ -979,6 +991,11 @@ private static Builder initDefaults(Builder builder) {
979991
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
980992
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
981993

994+
builder
995+
.unenrollDataSourcesSettings()
996+
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
997+
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
998+
982999
builder
9831000
.listLocationsSettings()
9841001
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
@@ -1105,6 +1122,12 @@ public UnaryCallSettings.Builder<EnrollDataSourcesRequest, Empty> enrollDataSour
11051122
return enrollDataSourcesSettings;
11061123
}
11071124

1125+
/** Returns the builder for the settings used for calls to unenrollDataSources. */
1126+
public UnaryCallSettings.Builder<UnenrollDataSourcesRequest, Empty>
1127+
unenrollDataSourcesSettings() {
1128+
return unenrollDataSourcesSettings;
1129+
}
1130+
11081131
/** Returns the builder for the settings used for calls to listLocations. */
11091132
public PagedCallSettings.Builder<
11101133
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 Google LLC
2+
* Copyright 2024 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)