Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): [bigquerydatatransfer] Update the Java code generator (gapic-generator-java) to 2.35.0 #10362

Merged
merged 4 commits into from
Feb 15, 2024
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
2 changes: 1 addition & 1 deletion java-bigquerydatatransfer/README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
"StartManualTransferRuns": {
"methods": ["startManualTransferRuns", "startManualTransferRunsCallable"]
},
"UnenrollDataSources": {
"methods": ["unenrollDataSources", "unenrollDataSourcesCallable"]
},
"UpdateTransferConfig": {
"methods": ["updateTransferConfig", "updateTransferConfig", "updateTransferConfigCallable"]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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