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

Commit fc9837e

Browse files
fix: restore GAPIC v2 retry configs (#143)
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
1 parent 6acfebb commit fc9837e

14 files changed

+360
-360
lines changed

google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceClient.java

Lines changed: 68 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
* <pre>
4040
* <code>
4141
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
42-
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
43-
* ErrorGroup response = errorGroupServiceClient.getGroup(groupName);
42+
* ErrorGroup group = ErrorGroup.newBuilder().build();
43+
* ErrorGroup response = errorGroupServiceClient.updateGroup(group);
4444
* }
4545
* </code>
4646
* </pre>
@@ -184,80 +184,68 @@ public final ErrorGroup getGroup(GroupName groupName) {
184184

185185
// AUTO-GENERATED DOCUMENTATION AND METHOD
186186
/**
187-
* Get the specified group.
187+
* Replace the data for the specified group. Fails if the group does not exist.
188188
*
189189
* <p>Sample code:
190190
*
191191
* <pre><code>
192192
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
193-
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
194-
* ErrorGroup response = errorGroupServiceClient.getGroup(groupName);
193+
* ErrorGroup group = ErrorGroup.newBuilder().build();
194+
* ErrorGroup response = errorGroupServiceClient.updateGroup(group);
195195
* }
196196
* </code></pre>
197197
*
198-
* @param groupName Required. The group resource name. Written as
199-
* &lt;code&gt;projects/&lt;var&gt;projectID&lt;/var&gt;/groups/&lt;var&gt;group_name&lt;/var&gt;&lt;/code&gt;.
200-
* Call &lt;a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list"&gt;
201-
* &lt;code&gt;groupStats.list&lt;/code&gt;&lt;/a&gt; to return a list of groups belonging to
202-
* this project.
203-
* <p>Example: &lt;code&gt;projects/my-project-123/groups/my-group&lt;/code&gt;
198+
* @param group Required. The group which replaces the resource on the server.
204199
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
205200
*/
206-
public final ErrorGroup getGroup(ErrorGroupName groupName) {
207-
GetGroupRequest request =
208-
GetGroupRequest.newBuilder()
209-
.setGroupName(groupName == null ? null : groupName.toString())
210-
.build();
211-
return getGroup(request);
201+
public final ErrorGroup updateGroup(ErrorGroup group) {
202+
UpdateGroupRequest request = UpdateGroupRequest.newBuilder().setGroup(group).build();
203+
return updateGroup(request);
212204
}
213205

214206
// AUTO-GENERATED DOCUMENTATION AND METHOD
215207
/**
216-
* Get the specified group.
208+
* Replace the data for the specified group. Fails if the group does not exist.
217209
*
218210
* <p>Sample code:
219211
*
220212
* <pre><code>
221213
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
222-
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
223-
* ErrorGroup response = errorGroupServiceClient.getGroup(groupName.toString());
214+
* ErrorGroup group = ErrorGroup.newBuilder().build();
215+
* UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
216+
* .setGroup(group)
217+
* .build();
218+
* ErrorGroup response = errorGroupServiceClient.updateGroup(request);
224219
* }
225220
* </code></pre>
226221
*
227-
* @param groupName Required. The group resource name. Written as
228-
* &lt;code&gt;projects/&lt;var&gt;projectID&lt;/var&gt;/groups/&lt;var&gt;group_name&lt;/var&gt;&lt;/code&gt;.
229-
* Call &lt;a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list"&gt;
230-
* &lt;code&gt;groupStats.list&lt;/code&gt;&lt;/a&gt; to return a list of groups belonging to
231-
* this project.
232-
* <p>Example: &lt;code&gt;projects/my-project-123/groups/my-group&lt;/code&gt;
222+
* @param request The request object containing all of the parameters for the API call.
233223
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
234224
*/
235-
public final ErrorGroup getGroup(String groupName) {
236-
GetGroupRequest request = GetGroupRequest.newBuilder().setGroupName(groupName).build();
237-
return getGroup(request);
225+
public final ErrorGroup updateGroup(UpdateGroupRequest request) {
226+
return updateGroupCallable().call(request);
238227
}
239228

240229
// AUTO-GENERATED DOCUMENTATION AND METHOD
241230
/**
242-
* Get the specified group.
231+
* Replace the data for the specified group. Fails if the group does not exist.
243232
*
244233
* <p>Sample code:
245234
*
246235
* <pre><code>
247236
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
248-
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
249-
* GetGroupRequest request = GetGroupRequest.newBuilder()
250-
* .setGroupName(groupName.toString())
237+
* ErrorGroup group = ErrorGroup.newBuilder().build();
238+
* UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
239+
* .setGroup(group)
251240
* .build();
252-
* ErrorGroup response = errorGroupServiceClient.getGroup(request);
241+
* ApiFuture&lt;ErrorGroup&gt; future = errorGroupServiceClient.updateGroupCallable().futureCall(request);
242+
* // Do something
243+
* ErrorGroup response = future.get();
253244
* }
254245
* </code></pre>
255-
*
256-
* @param request The request object containing all of the parameters for the API call.
257-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
258246
*/
259-
public final ErrorGroup getGroup(GetGroupRequest request) {
260-
return getGroupCallable().call(request);
247+
public final UnaryCallable<UpdateGroupRequest, ErrorGroup> updateGroupCallable() {
248+
return stub.updateGroupCallable();
261249
}
262250

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

285280
// AUTO-GENERATED DOCUMENTATION AND METHOD
286281
/**
287-
* Replace the data for the specified group. Fails if the group does not exist.
282+
* Get the specified group.
288283
*
289284
* <p>Sample code:
290285
*
291286
* <pre><code>
292287
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
293-
* ErrorGroup group = ErrorGroup.newBuilder().build();
294-
* ErrorGroup response = errorGroupServiceClient.updateGroup(group);
288+
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
289+
* ErrorGroup response = errorGroupServiceClient.getGroup(groupName.toString());
295290
* }
296291
* </code></pre>
297292
*
298-
* @param group Required. The group which replaces the resource on the server.
293+
* @param groupName Required. The group resource name. Written as
294+
* &lt;code&gt;projects/&lt;var&gt;projectID&lt;/var&gt;/groups/&lt;var&gt;group_name&lt;/var&gt;&lt;/code&gt;.
295+
* Call &lt;a href="/error-reporting/reference/rest/v1beta1/projects.groupStats/list"&gt;
296+
* &lt;code&gt;groupStats.list&lt;/code&gt;&lt;/a&gt; to return a list of groups belonging to
297+
* this project.
298+
* <p>Example: &lt;code&gt;projects/my-project-123/groups/my-group&lt;/code&gt;
299299
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
300300
*/
301-
public final ErrorGroup updateGroup(ErrorGroup group) {
302-
UpdateGroupRequest request = UpdateGroupRequest.newBuilder().setGroup(group).build();
303-
return updateGroup(request);
301+
public final ErrorGroup getGroup(String groupName) {
302+
GetGroupRequest request = GetGroupRequest.newBuilder().setGroupName(groupName).build();
303+
return getGroup(request);
304304
}
305305

306306
// AUTO-GENERATED DOCUMENTATION AND METHOD
307307
/**
308-
* Replace the data for the specified group. Fails if the group does not exist.
308+
* Get the specified group.
309309
*
310310
* <p>Sample code:
311311
*
312312
* <pre><code>
313313
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
314-
* ErrorGroup group = ErrorGroup.newBuilder().build();
315-
* UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
316-
* .setGroup(group)
314+
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
315+
* GetGroupRequest request = GetGroupRequest.newBuilder()
316+
* .setGroupName(groupName.toString())
317317
* .build();
318-
* ErrorGroup response = errorGroupServiceClient.updateGroup(request);
318+
* ErrorGroup response = errorGroupServiceClient.getGroup(request);
319319
* }
320320
* </code></pre>
321321
*
322322
* @param request The request object containing all of the parameters for the API call.
323323
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
324324
*/
325-
public final ErrorGroup updateGroup(UpdateGroupRequest request) {
326-
return updateGroupCallable().call(request);
325+
public final ErrorGroup getGroup(GetGroupRequest request) {
326+
return getGroupCallable().call(request);
327327
}
328328

329329
// AUTO-GENERATED DOCUMENTATION AND METHOD
330330
/**
331-
* Replace the data for the specified group. Fails if the group does not exist.
331+
* Get the specified group.
332332
*
333333
* <p>Sample code:
334334
*
335335
* <pre><code>
336336
* try (ErrorGroupServiceClient errorGroupServiceClient = ErrorGroupServiceClient.create()) {
337-
* ErrorGroup group = ErrorGroup.newBuilder().build();
338-
* UpdateGroupRequest request = UpdateGroupRequest.newBuilder()
339-
* .setGroup(group)
337+
* ErrorGroupName groupName = ErrorGroupName.of("[PROJECT]", "[GROUP]");
338+
* GetGroupRequest request = GetGroupRequest.newBuilder()
339+
* .setGroupName(groupName.toString())
340340
* .build();
341-
* ApiFuture&lt;ErrorGroup&gt; future = errorGroupServiceClient.updateGroupCallable().futureCall(request);
341+
* ApiFuture&lt;ErrorGroup&gt; future = errorGroupServiceClient.getGroupCallable().futureCall(request);
342342
* // Do something
343343
* ErrorGroup response = future.get();
344344
* }
345345
* </code></pre>
346346
*/
347-
public final UnaryCallable<UpdateGroupRequest, ErrorGroup> updateGroupCallable() {
348-
return stub.updateGroupCallable();
347+
public final UnaryCallable<GetGroupRequest, ErrorGroup> getGroupCallable() {
348+
return stub.getGroupCallable();
349349
}
350350

351351
@Override

google-cloud-errorreporting/src/main/java/com/google/cloud/errorreporting/v1beta1/ErrorGroupServiceSettings.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,16 @@
4949
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
5050
* build() is called, the tree of builders is called to create the complete settings object.
5151
*
52-
* <p>For example, to set the total timeout of getGroup to 30 seconds:
52+
* <p>For example, to set the total timeout of updateGroup to 30 seconds:
5353
*
5454
* <pre>
5555
* <code>
5656
* ErrorGroupServiceSettings.Builder errorGroupServiceSettingsBuilder =
5757
* ErrorGroupServiceSettings.newBuilder();
5858
* errorGroupServiceSettingsBuilder
59-
* .getGroupSettings()
59+
* .updateGroupSettings()
6060
* .setRetrySettings(
61-
* errorGroupServiceSettingsBuilder.getGroupSettings().getRetrySettings().toBuilder()
61+
* errorGroupServiceSettingsBuilder.updateGroupSettings().getRetrySettings().toBuilder()
6262
* .setTotalTimeout(Duration.ofSeconds(30))
6363
* .build());
6464
* ErrorGroupServiceSettings errorGroupServiceSettings = errorGroupServiceSettingsBuilder.build();
@@ -68,16 +68,16 @@
6868
@Generated("by gapic-generator")
6969
@BetaApi
7070
public class ErrorGroupServiceSettings extends ClientSettings<ErrorGroupServiceSettings> {
71-
/** Returns the object with the settings used for calls to getGroup. */
72-
public UnaryCallSettings<GetGroupRequest, ErrorGroup> getGroupSettings() {
73-
return ((ErrorGroupServiceStubSettings) getStubSettings()).getGroupSettings();
74-
}
75-
7671
/** Returns the object with the settings used for calls to updateGroup. */
7772
public UnaryCallSettings<UpdateGroupRequest, ErrorGroup> updateGroupSettings() {
7873
return ((ErrorGroupServiceStubSettings) getStubSettings()).updateGroupSettings();
7974
}
8075

76+
/** Returns the object with the settings used for calls to getGroup. */
77+
public UnaryCallSettings<GetGroupRequest, ErrorGroup> getGroupSettings() {
78+
return ((ErrorGroupServiceStubSettings) getStubSettings()).getGroupSettings();
79+
}
80+
8181
public static final ErrorGroupServiceSettings create(ErrorGroupServiceStubSettings stub)
8282
throws IOException {
8383
return new ErrorGroupServiceSettings.Builder(stub.toBuilder()).build();
@@ -175,16 +175,16 @@ public Builder applyToAllUnaryMethods(
175175
return this;
176176
}
177177

178-
/** Returns the builder for the settings used for calls to getGroup. */
179-
public UnaryCallSettings.Builder<GetGroupRequest, ErrorGroup> getGroupSettings() {
180-
return getStubSettingsBuilder().getGroupSettings();
181-
}
182-
183178
/** Returns the builder for the settings used for calls to updateGroup. */
184179
public UnaryCallSettings.Builder<UpdateGroupRequest, ErrorGroup> updateGroupSettings() {
185180
return getStubSettingsBuilder().updateGroupSettings();
186181
}
187182

183+
/** Returns the builder for the settings used for calls to getGroup. */
184+
public UnaryCallSettings.Builder<GetGroupRequest, ErrorGroup> getGroupSettings() {
185+
return getStubSettingsBuilder().getGroupSettings();
186+
}
187+
188188
@Override
189189
public ErrorGroupServiceSettings build() throws IOException {
190190
return new ErrorGroupServiceSettings(this);

0 commit comments

Comments
 (0)