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

Commit a311014

Browse files
feat!: release gapic-generator-java v2.0.0 (#513)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/2a082ef0-c330-4a6e-9973-9c369e5572b8/targets - [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.) PiperOrigin-RevId: 388535346 Source-Link: googleapis/googleapis@d9eaf41 PiperOrigin-RevId: 388499329 Source-Link: googleapis/googleapis@bb0a090
1 parent 83940e2 commit a311014

File tree

7 files changed

+22
-14
lines changed

7 files changed

+22
-14
lines changed

Diff for: google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/TextToSpeechSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,13 @@ public TextToSpeechStubSettings.Builder getStubSettingsBuilder() {
161161
return ((TextToSpeechStubSettings.Builder) getStubSettings());
162162
}
163163

164-
// NEXT_MAJOR_VER: remove 'throws Exception'.
165164
/**
166165
* Applies the given settings updater function to all of the unary API methods in this service.
167166
*
168167
* <p>Note: This method does not support applying settings to streaming methods.
169168
*/
170169
public Builder applyToAllUnaryMethods(
171-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
170+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
172171
super.applyToAllUnaryMethods(
173172
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
174173
return this;

Diff for: google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/stub/GrpcTextToSpeechStub.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,13 @@ public UnaryCallable<ListVoicesRequest, ListVoicesResponse> listVoicesCallable()
145145

146146
@Override
147147
public final void close() {
148-
shutdown();
148+
try {
149+
backgroundResources.close();
150+
} catch (RuntimeException e) {
151+
throw e;
152+
} catch (Exception e) {
153+
throw new IllegalStateException("Failed to close resource", e);
154+
}
149155
}
150156

151157
@Override

Diff for: google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1/stub/TextToSpeechStubSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,13 @@ private static Builder initDefaults(Builder builder) {
269269
return builder;
270270
}
271271

272-
// NEXT_MAJOR_VER: remove 'throws Exception'.
273272
/**
274273
* Applies the given settings updater function to all of the unary API methods in this service.
275274
*
276275
* <p>Note: This method does not support applying settings to streaming methods.
277276
*/
278277
public Builder applyToAllUnaryMethods(
279-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
278+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
280279
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
281280
return this;
282281
}

Diff for: google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/TextToSpeechSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,13 @@ public TextToSpeechStubSettings.Builder getStubSettingsBuilder() {
162162
return ((TextToSpeechStubSettings.Builder) getStubSettings());
163163
}
164164

165-
// NEXT_MAJOR_VER: remove 'throws Exception'.
166165
/**
167166
* Applies the given settings updater function to all of the unary API methods in this service.
168167
*
169168
* <p>Note: This method does not support applying settings to streaming methods.
170169
*/
171170
public Builder applyToAllUnaryMethods(
172-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
171+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
173172
super.applyToAllUnaryMethods(
174173
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
175174
return this;

Diff for: google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/stub/GrpcTextToSpeechStub.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,13 @@ public UnaryCallable<ListVoicesRequest, ListVoicesResponse> listVoicesCallable()
147147

148148
@Override
149149
public final void close() {
150-
shutdown();
150+
try {
151+
backgroundResources.close();
152+
} catch (RuntimeException e) {
153+
throw e;
154+
} catch (Exception e) {
155+
throw new IllegalStateException("Failed to close resource", e);
156+
}
151157
}
152158

153159
@Override

Diff for: google-cloud-texttospeech/src/main/java/com/google/cloud/texttospeech/v1beta1/stub/TextToSpeechStubSettings.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -270,14 +270,13 @@ private static Builder initDefaults(Builder builder) {
270270
return builder;
271271
}
272272

273-
// NEXT_MAJOR_VER: remove 'throws Exception'.
274273
/**
275274
* Applies the given settings updater function to all of the unary API methods in this service.
276275
*
277276
* <p>Note: This method does not support applying settings to streaming methods.
278277
*/
279278
public Builder applyToAllUnaryMethods(
280-
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
279+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
281280
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
282281
return this;
283282
}

Diff for: synth.metadata

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
"git": {
1212
"name": "googleapis",
1313
"remote": "https://github.com/googleapis/googleapis.git",
14-
"sha": "08c4eeb531c01ad031134dca94b18e3f7dd35902",
15-
"internalRef": "378718217"
14+
"sha": "d9eaf41de44d953458b18712a3f240bb4c564e48",
15+
"internalRef": "388535346"
1616
}
1717
},
1818
{
1919
"git": {
2020
"name": "googleapis",
2121
"remote": "https://github.com/googleapis/googleapis.git",
22-
"sha": "08c4eeb531c01ad031134dca94b18e3f7dd35902",
23-
"internalRef": "378718217"
22+
"sha": "d9eaf41de44d953458b18712a3f240bb4c564e48",
23+
"internalRef": "388535346"
2424
}
2525
},
2626
{

0 commit comments

Comments
 (0)