Skip to content

Commit

Permalink
fix(deps): [bigquerydatatransfer] Update the Java code generator (gap…
Browse files Browse the repository at this point in the history
…ic-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: googleapis/googleapis-gen@05afb31
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: googleapis/googleapis-gen@2f98a6f
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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Feb 15, 2024
1 parent 23bb18b commit 651ba65
Show file tree
Hide file tree
Showing 104 changed files with 1,872 additions and 225 deletions.
2 changes: 1 addition & 1 deletion java-bigquerydatatransfer/README.md
Expand Up @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-bigquerydatatransfer.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerydatatransfer/2.34.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-bigquerydatatransfer/2.35.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -353,6 +353,20 @@
* </td>
* </tr>
* <tr>
* <td><p> UnenrollDataSources</td>
* <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>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
* <li><p> unenrollDataSources(UnenrollDataSourcesRequest request)
* </ul>
* <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>
* <ul>
* <li><p> unenrollDataSourcesCallable()
* </ul>
* </td>
* </tr>
* <tr>
* <td><p> ListLocations</td>
* <td><p> Lists information about the supported locations for this service.</td>
* <td>
Expand Down Expand Up @@ -2596,6 +2610,68 @@ public final UnaryCallable<EnrollDataSourcesRequest, Empty> enrollDataSourcesCal
return stub.enrollDataSourcesCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* 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).
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
* UnenrollDataSourcesRequest request =
* UnenrollDataSourcesRequest.newBuilder()
* .setName("name3373707")
* .addAllDataSourceIds(new ArrayList<String>())
* .build();
* dataTransferServiceClient.unenrollDataSources(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 unenrollDataSources(UnenrollDataSourcesRequest request) {
unenrollDataSourcesCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* 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).
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (DataTransferServiceClient dataTransferServiceClient = DataTransferServiceClient.create()) {
* UnenrollDataSourcesRequest request =
* UnenrollDataSourcesRequest.newBuilder()
* .setName("name3373707")
* .addAllDataSourceIds(new ArrayList<String>())
* .build();
* ApiFuture<Empty> future =
* dataTransferServiceClient.unenrollDataSourcesCallable().futureCall(request);
* // Do something.
* future.get();
* }
* }</pre>
*/
public final UnaryCallable<UnenrollDataSourcesRequest, Empty> unenrollDataSourcesCallable() {
return stub.unenrollDataSourcesCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Lists information about the supported locations for this service.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -179,6 +179,11 @@ public UnaryCallSettings<EnrollDataSourcesRequest, Empty> enrollDataSourcesSetti
return ((DataTransferServiceStubSettings) getStubSettings()).enrollDataSourcesSettings();
}

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

/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings() {
Expand Down Expand Up @@ -231,7 +236,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return DataTransferServiceStubSettings.defaultTransportChannelProvider();
}

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

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

/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
Expand Down
Expand Up @@ -58,6 +58,9 @@
"StartManualTransferRuns": {
"methods": ["startManualTransferRuns", "startManualTransferRunsCallable"]
},
"UnenrollDataSources": {
"methods": ["unenrollDataSources", "unenrollDataSourcesCallable"]
},
"UpdateTransferConfig": {
"methods": ["updateTransferConfig", "updateTransferConfig", "updateTransferConfigCallable"]
}
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -48,6 +48,7 @@
import com.google.cloud.bigquery.datatransfer.v1.StartManualTransferRunsResponse;
import com.google.cloud.bigquery.datatransfer.v1.TransferConfig;
import com.google.cloud.bigquery.datatransfer.v1.TransferRun;
import com.google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest;
import com.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
Expand Down Expand Up @@ -151,6 +152,10 @@ public UnaryCallable<EnrollDataSourcesRequest, Empty> enrollDataSourcesCallable(
throw new UnsupportedOperationException("Not implemented: enrollDataSourcesCallable()");
}

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

public UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
listLocationsPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -72,6 +72,7 @@
import com.google.cloud.bigquery.datatransfer.v1.TransferConfig;
import com.google.cloud.bigquery.datatransfer.v1.TransferMessage;
import com.google.cloud.bigquery.datatransfer.v1.TransferRun;
import com.google.cloud.bigquery.datatransfer.v1.UnenrollDataSourcesRequest;
import com.google.cloud.bigquery.datatransfer.v1.UpdateTransferConfigRequest;
import com.google.cloud.location.GetLocationRequest;
import com.google.cloud.location.ListLocationsRequest;
Expand Down Expand Up @@ -161,6 +162,7 @@ public class DataTransferServiceStubSettings extends StubSettings<DataTransferSe
private final UnaryCallSettings<CheckValidCredsRequest, CheckValidCredsResponse>
checkValidCredsSettings;
private final UnaryCallSettings<EnrollDataSourcesRequest, Empty> enrollDataSourcesSettings;
private final UnaryCallSettings<UnenrollDataSourcesRequest, Empty> unenrollDataSourcesSettings;
private final PagedCallSettings<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
Expand Down Expand Up @@ -547,6 +549,11 @@ public UnaryCallSettings<EnrollDataSourcesRequest, Empty> enrollDataSourcesSetti
return enrollDataSourcesSettings;
}

/** Returns the object with the settings used for calls to unenrollDataSources. */
public UnaryCallSettings<UnenrollDataSourcesRequest, Empty> unenrollDataSourcesSettings() {
return unenrollDataSourcesSettings;
}

/** Returns the object with the settings used for calls to listLocations. */
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings() {
Expand Down Expand Up @@ -633,7 +640,6 @@ public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}

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

@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
Expand Down Expand Up @@ -694,6 +699,7 @@ protected DataTransferServiceStubSettings(Builder settingsBuilder) throws IOExce
listTransferLogsSettings = settingsBuilder.listTransferLogsSettings().build();
checkValidCredsSettings = settingsBuilder.checkValidCredsSettings().build();
enrollDataSourcesSettings = settingsBuilder.enrollDataSourcesSettings().build();
unenrollDataSourcesSettings = settingsBuilder.unenrollDataSourcesSettings().build();
listLocationsSettings = settingsBuilder.listLocationsSettings().build();
getLocationSettings = settingsBuilder.getLocationSettings().build();
}
Expand Down Expand Up @@ -739,6 +745,8 @@ public static class Builder
checkValidCredsSettings;
private final UnaryCallSettings.Builder<EnrollDataSourcesRequest, Empty>
enrollDataSourcesSettings;
private final UnaryCallSettings.Builder<UnenrollDataSourcesRequest, Empty>
unenrollDataSourcesSettings;
private final PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
listLocationsSettings;
Expand Down Expand Up @@ -812,6 +820,7 @@ protected Builder(ClientContext clientContext) {
listTransferLogsSettings = PagedCallSettings.newBuilder(LIST_TRANSFER_LOGS_PAGE_STR_FACT);
checkValidCredsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
enrollDataSourcesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
unenrollDataSourcesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT);
getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();

Expand All @@ -832,6 +841,7 @@ protected Builder(ClientContext clientContext) {
listTransferLogsSettings,
checkValidCredsSettings,
enrollDataSourcesSettings,
unenrollDataSourcesSettings,
listLocationsSettings,
getLocationSettings);
initDefaults(this);
Expand All @@ -855,6 +865,7 @@ protected Builder(DataTransferServiceStubSettings settings) {
listTransferLogsSettings = settings.listTransferLogsSettings.toBuilder();
checkValidCredsSettings = settings.checkValidCredsSettings.toBuilder();
enrollDataSourcesSettings = settings.enrollDataSourcesSettings.toBuilder();
unenrollDataSourcesSettings = settings.unenrollDataSourcesSettings.toBuilder();
listLocationsSettings = settings.listLocationsSettings.toBuilder();
getLocationSettings = settings.getLocationSettings.toBuilder();

Expand All @@ -875,6 +886,7 @@ protected Builder(DataTransferServiceStubSettings settings) {
listTransferLogsSettings,
checkValidCredsSettings,
enrollDataSourcesSettings,
unenrollDataSourcesSettings,
listLocationsSettings,
getLocationSettings);
}
Expand Down Expand Up @@ -979,6 +991,11 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));

builder
.unenrollDataSourcesSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));

builder
.listLocationsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
Expand Down Expand Up @@ -1105,6 +1122,12 @@ public UnaryCallSettings.Builder<EnrollDataSourcesRequest, Empty> enrollDataSour
return enrollDataSourcesSettings;
}

/** Returns the builder for the settings used for calls to unenrollDataSources. */
public UnaryCallSettings.Builder<UnenrollDataSourcesRequest, Empty>
unenrollDataSourcesSettings() {
return unenrollDataSourcesSettings;
}

/** Returns the builder for the settings used for calls to listLocations. */
public PagedCallSettings.Builder<
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 651ba65

Please sign in to comment.