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

Commit 516440b

Browse files
fix: migrate to grpc_service_config (#228)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/a3e09c0b-006d-4d98-8e96-744af862718e/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 317700003 Source-Link: googleapis/googleapis@97e94f5 PiperOrigin-RevId: 317699992 Source-Link: googleapis/googleapis@72efdc0
1 parent f6e7a37 commit 516440b

14 files changed

+725
-701
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
1717
<dependency>
1818
<groupId>com.google.cloud</groupId>
1919
<artifactId>libraries-bom</artifactId>
20-
<version>7.0.0</version>
20+
<version>7.0.1</version>
2121
<type>pom</type>
2222
<scope>import</scope>
2323
</dependency>

google-cloud-translate/src/main/java/com/google/cloud/translate/v3/TranslationServiceClient.java

+127-127
Original file line numberDiff line numberDiff line change
@@ -173,133 +173,6 @@ public final OperationsClient getOperationsClient() {
173173
return operationsClient;
174174
}
175175

176-
// AUTO-GENERATED DOCUMENTATION AND METHOD
177-
/**
178-
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
179-
* NOT_FOUND, if the glossary doesn't exist.
180-
*
181-
* <p>Sample code:
182-
*
183-
* <pre><code>
184-
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
185-
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
186-
* DeleteGlossaryResponse response = translationServiceClient.deleteGlossaryAsync(name).get();
187-
* }
188-
* </code></pre>
189-
*
190-
* @param name Required. The name of the glossary to delete.
191-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
192-
*/
193-
@BetaApi(
194-
"The surface for long-running operations is not stable yet and may change in the future.")
195-
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
196-
GlossaryName name) {
197-
DeleteGlossaryRequest request =
198-
DeleteGlossaryRequest.newBuilder().setName(name == null ? null : name.toString()).build();
199-
return deleteGlossaryAsync(request);
200-
}
201-
202-
// AUTO-GENERATED DOCUMENTATION AND METHOD
203-
/**
204-
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
205-
* NOT_FOUND, if the glossary doesn't exist.
206-
*
207-
* <p>Sample code:
208-
*
209-
* <pre><code>
210-
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
211-
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
212-
* DeleteGlossaryResponse response = translationServiceClient.deleteGlossaryAsync(name.toString()).get();
213-
* }
214-
* </code></pre>
215-
*
216-
* @param name Required. The name of the glossary to delete.
217-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
218-
*/
219-
@BetaApi(
220-
"The surface for long-running operations is not stable yet and may change in the future.")
221-
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
222-
String name) {
223-
DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder().setName(name).build();
224-
return deleteGlossaryAsync(request);
225-
}
226-
227-
// AUTO-GENERATED DOCUMENTATION AND METHOD
228-
/**
229-
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
230-
* NOT_FOUND, if the glossary doesn't exist.
231-
*
232-
* <p>Sample code:
233-
*
234-
* <pre><code>
235-
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
236-
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
237-
* DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder()
238-
* .setName(name.toString())
239-
* .build();
240-
* DeleteGlossaryResponse response = translationServiceClient.deleteGlossaryAsync(request).get();
241-
* }
242-
* </code></pre>
243-
*
244-
* @param request The request object containing all of the parameters for the API call.
245-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
246-
*/
247-
@BetaApi(
248-
"The surface for long-running operations is not stable yet and may change in the future.")
249-
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
250-
DeleteGlossaryRequest request) {
251-
return deleteGlossaryOperationCallable().futureCall(request);
252-
}
253-
254-
// AUTO-GENERATED DOCUMENTATION AND METHOD
255-
/**
256-
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
257-
* NOT_FOUND, if the glossary doesn't exist.
258-
*
259-
* <p>Sample code:
260-
*
261-
* <pre><code>
262-
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
263-
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
264-
* DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder()
265-
* .setName(name.toString())
266-
* .build();
267-
* OperationFuture&lt;DeleteGlossaryResponse, DeleteGlossaryMetadata&gt; future = translationServiceClient.deleteGlossaryOperationCallable().futureCall(request);
268-
* // Do something
269-
* DeleteGlossaryResponse response = future.get();
270-
* }
271-
* </code></pre>
272-
*/
273-
@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
274-
public final OperationCallable<
275-
DeleteGlossaryRequest, DeleteGlossaryResponse, DeleteGlossaryMetadata>
276-
deleteGlossaryOperationCallable() {
277-
return stub.deleteGlossaryOperationCallable();
278-
}
279-
280-
// AUTO-GENERATED DOCUMENTATION AND METHOD
281-
/**
282-
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
283-
* NOT_FOUND, if the glossary doesn't exist.
284-
*
285-
* <p>Sample code:
286-
*
287-
* <pre><code>
288-
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
289-
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
290-
* DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder()
291-
* .setName(name.toString())
292-
* .build();
293-
* ApiFuture&lt;Operation&gt; future = translationServiceClient.deleteGlossaryCallable().futureCall(request);
294-
* // Do something
295-
* Operation response = future.get();
296-
* }
297-
* </code></pre>
298-
*/
299-
public final UnaryCallable<DeleteGlossaryRequest, Operation> deleteGlossaryCallable() {
300-
return stub.deleteGlossaryCallable();
301-
}
302-
303176
// AUTO-GENERATED DOCUMENTATION AND METHOD
304177
/**
305178
* Translates input text and returns translated text.
@@ -1318,6 +1191,133 @@ public final UnaryCallable<GetGlossaryRequest, Glossary> getGlossaryCallable() {
13181191
return stub.getGlossaryCallable();
13191192
}
13201193

1194+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1195+
/**
1196+
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
1197+
* NOT_FOUND, if the glossary doesn't exist.
1198+
*
1199+
* <p>Sample code:
1200+
*
1201+
* <pre><code>
1202+
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
1203+
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
1204+
* DeleteGlossaryResponse response = translationServiceClient.deleteGlossaryAsync(name).get();
1205+
* }
1206+
* </code></pre>
1207+
*
1208+
* @param name Required. The name of the glossary to delete.
1209+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1210+
*/
1211+
@BetaApi(
1212+
"The surface for long-running operations is not stable yet and may change in the future.")
1213+
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
1214+
GlossaryName name) {
1215+
DeleteGlossaryRequest request =
1216+
DeleteGlossaryRequest.newBuilder().setName(name == null ? null : name.toString()).build();
1217+
return deleteGlossaryAsync(request);
1218+
}
1219+
1220+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1221+
/**
1222+
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
1223+
* NOT_FOUND, if the glossary doesn't exist.
1224+
*
1225+
* <p>Sample code:
1226+
*
1227+
* <pre><code>
1228+
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
1229+
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
1230+
* DeleteGlossaryResponse response = translationServiceClient.deleteGlossaryAsync(name.toString()).get();
1231+
* }
1232+
* </code></pre>
1233+
*
1234+
* @param name Required. The name of the glossary to delete.
1235+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1236+
*/
1237+
@BetaApi(
1238+
"The surface for long-running operations is not stable yet and may change in the future.")
1239+
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
1240+
String name) {
1241+
DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder().setName(name).build();
1242+
return deleteGlossaryAsync(request);
1243+
}
1244+
1245+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1246+
/**
1247+
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
1248+
* NOT_FOUND, if the glossary doesn't exist.
1249+
*
1250+
* <p>Sample code:
1251+
*
1252+
* <pre><code>
1253+
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
1254+
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
1255+
* DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder()
1256+
* .setName(name.toString())
1257+
* .build();
1258+
* DeleteGlossaryResponse response = translationServiceClient.deleteGlossaryAsync(request).get();
1259+
* }
1260+
* </code></pre>
1261+
*
1262+
* @param request The request object containing all of the parameters for the API call.
1263+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1264+
*/
1265+
@BetaApi(
1266+
"The surface for long-running operations is not stable yet and may change in the future.")
1267+
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
1268+
DeleteGlossaryRequest request) {
1269+
return deleteGlossaryOperationCallable().futureCall(request);
1270+
}
1271+
1272+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1273+
/**
1274+
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
1275+
* NOT_FOUND, if the glossary doesn't exist.
1276+
*
1277+
* <p>Sample code:
1278+
*
1279+
* <pre><code>
1280+
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
1281+
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
1282+
* DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder()
1283+
* .setName(name.toString())
1284+
* .build();
1285+
* OperationFuture&lt;DeleteGlossaryResponse, DeleteGlossaryMetadata&gt; future = translationServiceClient.deleteGlossaryOperationCallable().futureCall(request);
1286+
* // Do something
1287+
* DeleteGlossaryResponse response = future.get();
1288+
* }
1289+
* </code></pre>
1290+
*/
1291+
@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
1292+
public final OperationCallable<
1293+
DeleteGlossaryRequest, DeleteGlossaryResponse, DeleteGlossaryMetadata>
1294+
deleteGlossaryOperationCallable() {
1295+
return stub.deleteGlossaryOperationCallable();
1296+
}
1297+
1298+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1299+
/**
1300+
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
1301+
* NOT_FOUND, if the glossary doesn't exist.
1302+
*
1303+
* <p>Sample code:
1304+
*
1305+
* <pre><code>
1306+
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
1307+
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
1308+
* DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder()
1309+
* .setName(name.toString())
1310+
* .build();
1311+
* ApiFuture&lt;Operation&gt; future = translationServiceClient.deleteGlossaryCallable().futureCall(request);
1312+
* // Do something
1313+
* Operation response = future.get();
1314+
* }
1315+
* </code></pre>
1316+
*/
1317+
public final UnaryCallable<DeleteGlossaryRequest, Operation> deleteGlossaryCallable() {
1318+
return stub.deleteGlossaryCallable();
1319+
}
1320+
13211321
@Override
13221322
public final void close() {
13231323
stub.close();

google-cloud-translate/src/main/java/com/google/cloud/translate/v3/TranslationServiceSettings.java

+28-28
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,6 @@
6969
@Generated("by gapic-generator")
7070
@BetaApi
7171
public class TranslationServiceSettings extends ClientSettings<TranslationServiceSettings> {
72-
/** Returns the object with the settings used for calls to deleteGlossary. */
73-
public UnaryCallSettings<DeleteGlossaryRequest, Operation> deleteGlossarySettings() {
74-
return ((TranslationServiceStubSettings) getStubSettings()).deleteGlossarySettings();
75-
}
76-
77-
/** Returns the object with the settings used for calls to deleteGlossary. */
78-
@BetaApi(
79-
"The surface for long-running operations is not stable yet and may change in the future.")
80-
public OperationCallSettings<
81-
DeleteGlossaryRequest, DeleteGlossaryResponse, DeleteGlossaryMetadata>
82-
deleteGlossaryOperationSettings() {
83-
return ((TranslationServiceStubSettings) getStubSettings()).deleteGlossaryOperationSettings();
84-
}
85-
8672
/** Returns the object with the settings used for calls to translateText. */
8773
public UnaryCallSettings<TranslateTextRequest, TranslateTextResponse> translateTextSettings() {
8874
return ((TranslationServiceStubSettings) getStubSettings()).translateTextSettings();
@@ -139,6 +125,20 @@ public UnaryCallSettings<GetGlossaryRequest, Glossary> getGlossarySettings() {
139125
return ((TranslationServiceStubSettings) getStubSettings()).getGlossarySettings();
140126
}
141127

128+
/** Returns the object with the settings used for calls to deleteGlossary. */
129+
public UnaryCallSettings<DeleteGlossaryRequest, Operation> deleteGlossarySettings() {
130+
return ((TranslationServiceStubSettings) getStubSettings()).deleteGlossarySettings();
131+
}
132+
133+
/** Returns the object with the settings used for calls to deleteGlossary. */
134+
@BetaApi(
135+
"The surface for long-running operations is not stable yet and may change in the future.")
136+
public OperationCallSettings<
137+
DeleteGlossaryRequest, DeleteGlossaryResponse, DeleteGlossaryMetadata>
138+
deleteGlossaryOperationSettings() {
139+
return ((TranslationServiceStubSettings) getStubSettings()).deleteGlossaryOperationSettings();
140+
}
141+
142142
public static final TranslationServiceSettings create(TranslationServiceStubSettings stub)
143143
throws IOException {
144144
return new TranslationServiceSettings.Builder(stub.toBuilder()).build();
@@ -236,20 +236,6 @@ public Builder applyToAllUnaryMethods(
236236
return this;
237237
}
238238

239-
/** Returns the builder for the settings used for calls to deleteGlossary. */
240-
public UnaryCallSettings.Builder<DeleteGlossaryRequest, Operation> deleteGlossarySettings() {
241-
return getStubSettingsBuilder().deleteGlossarySettings();
242-
}
243-
244-
/** Returns the builder for the settings used for calls to deleteGlossary. */
245-
@BetaApi(
246-
"The surface for long-running operations is not stable yet and may change in the future.")
247-
public OperationCallSettings.Builder<
248-
DeleteGlossaryRequest, DeleteGlossaryResponse, DeleteGlossaryMetadata>
249-
deleteGlossaryOperationSettings() {
250-
return getStubSettingsBuilder().deleteGlossaryOperationSettings();
251-
}
252-
253239
/** Returns the builder for the settings used for calls to translateText. */
254240
public UnaryCallSettings.Builder<TranslateTextRequest, TranslateTextResponse>
255241
translateTextSettings() {
@@ -308,6 +294,20 @@ public UnaryCallSettings.Builder<GetGlossaryRequest, Glossary> getGlossarySettin
308294
return getStubSettingsBuilder().getGlossarySettings();
309295
}
310296

297+
/** Returns the builder for the settings used for calls to deleteGlossary. */
298+
public UnaryCallSettings.Builder<DeleteGlossaryRequest, Operation> deleteGlossarySettings() {
299+
return getStubSettingsBuilder().deleteGlossarySettings();
300+
}
301+
302+
/** Returns the builder for the settings used for calls to deleteGlossary. */
303+
@BetaApi(
304+
"The surface for long-running operations is not stable yet and may change in the future.")
305+
public OperationCallSettings.Builder<
306+
DeleteGlossaryRequest, DeleteGlossaryResponse, DeleteGlossaryMetadata>
307+
deleteGlossaryOperationSettings() {
308+
return getStubSettingsBuilder().deleteGlossaryOperationSettings();
309+
}
310+
311311
@Override
312312
public TranslationServiceSettings build() throws IOException {
313313
return new TranslationServiceSettings(this);

0 commit comments

Comments
 (0)