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

Commit

Permalink
fix: restore GAPIC v2 retry configs (#143)
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 6acfebb commit fc9837e
Show file tree
Hide file tree
Showing 14 changed files with 360 additions and 360 deletions.
Expand Up @@ -39,8 +39,8 @@
* <pre>
* <code>
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
* ErrorGroup response = errorGroupServiceClient.getGroup(groupName);
* ErrorGroup group = ErrorGroup.newBuilder().build();
* ErrorGroup response = errorGroupServiceClient.updateGroup(group);
* }
* </code>
* </pre>
Expand Down Expand Up @@ -184,80 +184,68 @@ public final ErrorGroup getGroup(GroupName groupName) {

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Get the specified group.
* Replace the data for the specified group. Fails if the group does not exist.
*
* <p>Sample code:
*
* <pre><code>
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
* ErrorGroup response = errorGroupServiceClient.getGroup(groupName);
* ErrorGroup group = ErrorGroup.newBuilder().build();
* ErrorGroup response = errorGroupServiceClient.updateGroup(group);
* }
* </code></pre>
*
* @param groupName Required. The group resource name. Written as
* &lt;code&gt;projects/&lt;var&gt;projectID&lt;/var&gt;/groups/&lt;var&gt;group_name&lt;/var&gt;&lt;/code&gt;.
* Call &lt;a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list"&gt;
* &lt;code&gt;groupStats.list&lt;/code&gt;&lt;/a&gt; to return a list of groups belonging to
* this project.
* <p>Example: &lt;code&gt;projects/my-project-123/groups/my-group&lt;/code&gt;
* @param group Required. The group which replaces the resource on the server.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ErrorGroup getGroup(ErrorGroupName groupName) {
GetGroupRequest request =
GetGroupRequest.newBuilder()
.setGroupName(groupName == null ? null : groupName.toString())
.build();
return getGroup(request);
public final ErrorGroup updateGroup(ErrorGroup group) {
UpdateGroupRequest request = UpdateGroupRequest.newBuilder().setGroup(group).build();
return updateGroup(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Get the specified group.
* Replace the data for the specified group. Fails if the group does not exist.
*
* <p>Sample code:
*
* <pre><code>
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
* ErrorGroup response = errorGroupServiceClient.getGroup(groupName.toString());
* ErrorGroup group = ErrorGroup.newBuilder().build();
* UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
* .setGroup(group)
* .build();
* ErrorGroup response = errorGroupServiceClient.updateGroup(request);
* }
* </code></pre>
*
* @param groupName Required. The group resource name. Written as
* &lt;code&gt;projects/&lt;var&gt;projectID&lt;/var&gt;/groups/&lt;var&gt;group_name&lt;/var&gt;&lt;/code&gt;.
* Call &lt;a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list"&gt;
* &lt;code&gt;groupStats.list&lt;/code&gt;&lt;/a&gt; to return a list of groups belonging to
* this project.
* <p>Example: &lt;code&gt;projects/my-project-123/groups/my-group&lt;/code&gt;
* @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 ErrorGroup getGroup(String groupName) {
GetGroupRequest request = GetGroupRequest.newBuilder().setGroupName(groupName).build();
return getGroup(request);
public final ErrorGroup updateGroup(UpdateGroupRequest request) {
return updateGroupCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Get the specified group.
* Replace the data for the specified group. Fails if the group does not exist.
*
* <p>Sample code:
*
* <pre><code>
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
* GetGroupRequest request = GetGroupRequest.newBuilder()
* .setGroupName(groupName.toString())
* ErrorGroup group = ErrorGroup.newBuilder().build();
* UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
* .setGroup(group)
* .build();
* ErrorGroup response = errorGroupServiceClient.getGroup(request);
* ApiFuture&lt;ErrorGroup&gt; future = errorGroupServiceClient.updateGroupCallable().futureCall(request);
* // Do something
* ErrorGroup response = future.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
*/
public final ErrorGroup getGroup(GetGroupRequest request) {
return getGroupCallable().call(request);
public final UnaryCallable<UpdateGroupRequest, ErrorGroup> updateGroupCallable() {
return stub.updateGroupCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
Expand All @@ -269,83 +257,95 @@ public final ErrorGroup getGroup(GetGroupRequest request) {
* <pre><code>
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
* GetGroupRequest request = GetGroupRequest.newBuilder()
* .setGroupName(groupName.toString())
* .build();
* ApiFuture&lt;ErrorGroup&gt; future = errorGroupServiceClient.getGroupCallable().futureCall(request);
* // Do something
* ErrorGroup response = future.get();
* ErrorGroup response = errorGroupServiceClient.getGroup(groupName);
* }
* </code></pre>
*
* @param groupName Required. The group resource name. Written as
* &lt;code&gt;projects/&lt;var&gt;projectID&lt;/var&gt;/groups/&lt;var&gt;group_name&lt;/var&gt;&lt;/code&gt;.
* Call &lt;a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list"&gt;
* &lt;code&gt;groupStats.list&lt;/code&gt;&lt;/a&gt; to return a list of groups belonging to
* this project.
* <p>Example: &lt;code&gt;projects/my-project-123/groups/my-group&lt;/code&gt;
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final UnaryCallable<GetGroupRequest, ErrorGroup> getGroupCallable() {
return stub.getGroupCallable();
public final ErrorGroup getGroup(ErrorGroupName groupName) {
GetGroupRequest request =
GetGroupRequest.newBuilder()
.setGroupName(groupName == null ? null : groupName.toString())
.build();
return getGroup(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Replace the data for the specified group. Fails if the group does not exist.
* Get the specified group.
*
* <p>Sample code:
*
* <pre><code>
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
* ErrorGroup group = ErrorGroup.newBuilder().build();
* ErrorGroup response = errorGroupServiceClient.updateGroup(group);
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
* ErrorGroup response = errorGroupServiceClient.getGroup(groupName.toString());
* }
* </code></pre>
*
* @param group Required. The group which replaces the resource on the server.
* @param groupName Required. The group resource name. Written as
* &lt;code&gt;projects/&lt;var&gt;projectID&lt;/var&gt;/groups/&lt;var&gt;group_name&lt;/var&gt;&lt;/code&gt;.
* Call &lt;a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list"&gt;
* &lt;code&gt;groupStats.list&lt;/code&gt;&lt;/a&gt; to return a list of groups belonging to
* this project.
* <p>Example: &lt;code&gt;projects/my-project-123/groups/my-group&lt;/code&gt;
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ErrorGroup updateGroup(ErrorGroup group) {
UpdateGroupRequest request = UpdateGroupRequest.newBuilder().setGroup(group).build();
return updateGroup(request);
public final ErrorGroup getGroup(String groupName) {
GetGroupRequest request = GetGroupRequest.newBuilder().setGroupName(groupName).build();
return getGroup(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Replace the data for the specified group. Fails if the group does not exist.
* Get the specified group.
*
* <p>Sample code:
*
* <pre><code>
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
* ErrorGroup group = ErrorGroup.newBuilder().build();
* UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
* .setGroup(group)
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
* GetGroupRequest request = GetGroupRequest.newBuilder()
* .setGroupName(groupName.toString())
* .build();
* ErrorGroup response = errorGroupServiceClient.updateGroup(request);
* ErrorGroup response = errorGroupServiceClient.getGroup(request);
* }
* </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
*/
public final ErrorGroup updateGroup(UpdateGroupRequest request) {
return updateGroupCallable().call(request);
public final ErrorGroup getGroup(GetGroupRequest request) {
return getGroupCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Replace the data for the specified group. Fails if the group does not exist.
* Get the specified group.
*
* <p>Sample code:
*
* <pre><code>
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
* ErrorGroup group = ErrorGroup.newBuilder().build();
* UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
* .setGroup(group)
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
* GetGroupRequest request = GetGroupRequest.newBuilder()
* .setGroupName(groupName.toString())
* .build();
* ApiFuture&lt;ErrorGroup&gt; future = errorGroupServiceClient.updateGroupCallable().futureCall(request);
* ApiFuture&lt;ErrorGroup&gt; future = errorGroupServiceClient.getGroupCallable().futureCall(request);
* // Do something
* ErrorGroup response = future.get();
* }
* </code></pre>
*/
public final UnaryCallable<UpdateGroupRequest, ErrorGroup> updateGroupCallable() {
return stub.updateGroupCallable();
public final UnaryCallable<GetGroupRequest, ErrorGroup> getGroupCallable() {
return stub.getGroupCallable();
}

@Override
Expand Down
Expand Up @@ -49,16 +49,16 @@
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
* <p>For example, to set the total timeout of getGroup to 30 seconds:
* <p>For example, to set the total timeout of updateGroup to 30 seconds:
*
* <pre>
* <code>
* ErrorGroupServiceSettings.Builder errorGroupServiceSettingsBuilder =
* ErrorGroupServiceSettings.newBuilder();
* errorGroupServiceSettingsBuilder
* .getGroupSettings()
* .updateGroupSettings()
* .setRetrySettings(
* errorGroupServiceSettingsBuilder.getGroupSettings().getRetrySettings().toBuilder()
* errorGroupServiceSettingsBuilder.updateGroupSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ErrorGroupServiceSettings errorGroupServiceSettings = errorGroupServiceSettingsBuilder.build();
Expand All @@ -68,16 +68,16 @@
@Generated("by gapic-generator")
@BetaApi
public class ErrorGroupServiceSettings extends ClientSettings<ErrorGroupServiceSettings> {
/** Returns the object with the settings used for calls to getGroup. */
public UnaryCallSettings<GetGroupRequest, ErrorGroup> getGroupSettings() {
return ((ErrorGroupServiceStubSettings) getStubSettings()).getGroupSettings();
}

/** Returns the object with the settings used for calls to updateGroup. */
public UnaryCallSettings<UpdateGroupRequest, ErrorGroup> updateGroupSettings() {
return ((ErrorGroupServiceStubSettings) getStubSettings()).updateGroupSettings();
}

/** Returns the object with the settings used for calls to getGroup. */
public UnaryCallSettings<GetGroupRequest, ErrorGroup> getGroupSettings() {
return ((ErrorGroupServiceStubSettings) getStubSettings()).getGroupSettings();
}

public static final ErrorGroupServiceSettings create(ErrorGroupServiceStubSettings stub)
throws IOException {
return new ErrorGroupServiceSettings.Builder(stub.toBuilder()).build();
Expand Down Expand Up @@ -175,16 +175,16 @@ public Builder applyToAllUnaryMethods(
return this;
}

/** Returns the builder for the settings used for calls to getGroup. */
public UnaryCallSettings.Builder<GetGroupRequest, ErrorGroup> getGroupSettings() {
return getStubSettingsBuilder().getGroupSettings();
}

/** Returns the builder for the settings used for calls to updateGroup. */
public UnaryCallSettings.Builder<UpdateGroupRequest, ErrorGroup> updateGroupSettings() {
return getStubSettingsBuilder().updateGroupSettings();
}

/** Returns the builder for the settings used for calls to getGroup. */
public UnaryCallSettings.Builder<GetGroupRequest, ErrorGroup> getGroupSettings() {
return getStubSettingsBuilder().getGroupSettings();
}

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

0 comments on commit fc9837e

Please sign in to comment.