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

Commit

Permalink
fix: restore GAPIC v2 retry configs (#188)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/b94bacd6-05ee-45c2-be4d-b0f667030fab/targets

PiperOrigin-RevId: 312088359
Source-Link: googleapis/googleapis@5a90d46
  • Loading branch information
yoshi-automation committed Jun 3, 2020
1 parent dd15b07 commit 92d4eaa
Show file tree
Hide file tree
Showing 13 changed files with 651 additions and 651 deletions.
Expand Up @@ -173,6 +173,133 @@ public final OperationsClient getOperationsClient() {
return operationsClient;
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
* NOT_FOUND, if the glossary doesn't exist.
*
* <p>Sample code:
*
* <pre><code>
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
* DeleteGlossaryResponse response = translationServiceClient.deleteGlossaryAsync(name).get();
* }
* </code></pre>
*
* @param name Required. The name of the glossary to delete.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
GlossaryName name) {
DeleteGlossaryRequest request =
DeleteGlossaryRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return deleteGlossaryAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
* NOT_FOUND, if the glossary doesn't exist.
*
* <p>Sample code:
*
* <pre><code>
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
* DeleteGlossaryResponse response = translationServiceClient.deleteGlossaryAsync(name.toString()).get();
* }
* </code></pre>
*
* @param name Required. The name of the glossary to delete.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
String name) {
DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder().setName(name).build();
return deleteGlossaryAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
* NOT_FOUND, if the glossary doesn't exist.
*
* <p>Sample code:
*
* <pre><code>
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
* DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder()
* .setName(name.toString())
* .build();
* DeleteGlossaryResponse response = translationServiceClient.deleteGlossaryAsync(request).get();
* }
* </code></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
*/
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
DeleteGlossaryRequest request) {
return deleteGlossaryOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
* NOT_FOUND, if the glossary doesn't exist.
*
* <p>Sample code:
*
* <pre><code>
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
* DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder()
* .setName(name.toString())
* .build();
* OperationFuture&lt;DeleteGlossaryResponse, DeleteGlossaryMetadata&gt; future = translationServiceClient.deleteGlossaryOperationCallable().futureCall(request);
* // Do something
* DeleteGlossaryResponse response = future.get();
* }
* </code></pre>
*/
@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallable<
DeleteGlossaryRequest, DeleteGlossaryResponse, DeleteGlossaryMetadata>
deleteGlossaryOperationCallable() {
return stub.deleteGlossaryOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
* NOT_FOUND, if the glossary doesn't exist.
*
* <p>Sample code:
*
* <pre><code>
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
* DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;Operation&gt; future = translationServiceClient.deleteGlossaryCallable().futureCall(request);
* // Do something
* Operation response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<DeleteGlossaryRequest, Operation> deleteGlossaryCallable() {
return stub.deleteGlossaryCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Translates input text and returns translated text.
Expand Down Expand Up @@ -1191,133 +1318,6 @@ public final UnaryCallable<GetGlossaryRequest, Glossary> getGlossaryCallable() {
return stub.getGlossaryCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
* NOT_FOUND, if the glossary doesn't exist.
*
* <p>Sample code:
*
* <pre><code>
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
* DeleteGlossaryResponse response = translationServiceClient.deleteGlossaryAsync(name).get();
* }
* </code></pre>
*
* @param name Required. The name of the glossary to delete.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
GlossaryName name) {
DeleteGlossaryRequest request =
DeleteGlossaryRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return deleteGlossaryAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
* NOT_FOUND, if the glossary doesn't exist.
*
* <p>Sample code:
*
* <pre><code>
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
* DeleteGlossaryResponse response = translationServiceClient.deleteGlossaryAsync(name.toString()).get();
* }
* </code></pre>
*
* @param name Required. The name of the glossary to delete.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
String name) {
DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder().setName(name).build();
return deleteGlossaryAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
* NOT_FOUND, if the glossary doesn't exist.
*
* <p>Sample code:
*
* <pre><code>
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
* DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder()
* .setName(name.toString())
* .build();
* DeleteGlossaryResponse response = translationServiceClient.deleteGlossaryAsync(request).get();
* }
* </code></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
*/
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public final OperationFuture<DeleteGlossaryResponse, DeleteGlossaryMetadata> deleteGlossaryAsync(
DeleteGlossaryRequest request) {
return deleteGlossaryOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
* NOT_FOUND, if the glossary doesn't exist.
*
* <p>Sample code:
*
* <pre><code>
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
* DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder()
* .setName(name.toString())
* .build();
* OperationFuture&lt;DeleteGlossaryResponse, DeleteGlossaryMetadata&gt; future = translationServiceClient.deleteGlossaryOperationCallable().futureCall(request);
* // Do something
* DeleteGlossaryResponse response = future.get();
* }
* </code></pre>
*/
@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
public final OperationCallable<
DeleteGlossaryRequest, DeleteGlossaryResponse, DeleteGlossaryMetadata>
deleteGlossaryOperationCallable() {
return stub.deleteGlossaryOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns
* NOT_FOUND, if the glossary doesn't exist.
*
* <p>Sample code:
*
* <pre><code>
* try (TranslationServiceClient translationServiceClient = TranslationServiceClient.create()) {
* GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
* DeleteGlossaryRequest request = DeleteGlossaryRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;Operation&gt; future = translationServiceClient.deleteGlossaryCallable().futureCall(request);
* // Do something
* Operation response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<DeleteGlossaryRequest, Operation> deleteGlossaryCallable() {
return stub.deleteGlossaryCallable();
}

@Override
public final void close() {
stub.close();
Expand Down
Expand Up @@ -69,6 +69,20 @@
@Generated("by gapic-generator")
@BetaApi
public class TranslationServiceSettings extends ClientSettings<TranslationServiceSettings> {
/** Returns the object with the settings used for calls to deleteGlossary. */
public UnaryCallSettings<DeleteGlossaryRequest, Operation> deleteGlossarySettings() {
return ((TranslationServiceStubSettings) getStubSettings()).deleteGlossarySettings();
}

/** Returns the object with the settings used for calls to deleteGlossary. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<
DeleteGlossaryRequest, DeleteGlossaryResponse, DeleteGlossaryMetadata>
deleteGlossaryOperationSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).deleteGlossaryOperationSettings();
}

/** Returns the object with the settings used for calls to translateText. */
public UnaryCallSettings<TranslateTextRequest, TranslateTextResponse> translateTextSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).translateTextSettings();
Expand Down Expand Up @@ -125,20 +139,6 @@ public UnaryCallSettings<GetGlossaryRequest, Glossary> getGlossarySettings() {
return ((TranslationServiceStubSettings) getStubSettings()).getGlossarySettings();
}

/** Returns the object with the settings used for calls to deleteGlossary. */
public UnaryCallSettings<DeleteGlossaryRequest, Operation> deleteGlossarySettings() {
return ((TranslationServiceStubSettings) getStubSettings()).deleteGlossarySettings();
}

/** Returns the object with the settings used for calls to deleteGlossary. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<
DeleteGlossaryRequest, DeleteGlossaryResponse, DeleteGlossaryMetadata>
deleteGlossaryOperationSettings() {
return ((TranslationServiceStubSettings) getStubSettings()).deleteGlossaryOperationSettings();
}

public static final TranslationServiceSettings create(TranslationServiceStubSettings stub)
throws IOException {
return new TranslationServiceSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -236,6 +236,20 @@ public Builder applyToAllUnaryMethods(
return this;
}

/** Returns the builder for the settings used for calls to deleteGlossary. */
public UnaryCallSettings.Builder<DeleteGlossaryRequest, Operation> deleteGlossarySettings() {
return getStubSettingsBuilder().deleteGlossarySettings();
}

/** Returns the builder for the settings used for calls to deleteGlossary. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
DeleteGlossaryRequest, DeleteGlossaryResponse, DeleteGlossaryMetadata>
deleteGlossaryOperationSettings() {
return getStubSettingsBuilder().deleteGlossaryOperationSettings();
}

/** Returns the builder for the settings used for calls to translateText. */
public UnaryCallSettings.Builder<TranslateTextRequest, TranslateTextResponse>
translateTextSettings() {
Expand Down Expand Up @@ -294,20 +308,6 @@ public UnaryCallSettings.Builder<GetGlossaryRequest, Glossary> getGlossarySettin
return getStubSettingsBuilder().getGlossarySettings();
}

/** Returns the builder for the settings used for calls to deleteGlossary. */
public UnaryCallSettings.Builder<DeleteGlossaryRequest, Operation> deleteGlossarySettings() {
return getStubSettingsBuilder().deleteGlossarySettings();
}

/** Returns the builder for the settings used for calls to deleteGlossary. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
DeleteGlossaryRequest, DeleteGlossaryResponse, DeleteGlossaryMetadata>
deleteGlossaryOperationSettings() {
return getStubSettingsBuilder().deleteGlossaryOperationSettings();
}

@Override
public TranslationServiceSettings build() throws IOException {
return new TranslationServiceSettings(this);
Expand Down

0 comments on commit 92d4eaa

Please sign in to comment.