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

Commit dd16f4c

Browse files
fix: migrate retry settings to grpc_service_config (#194)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/8090a8db-78af-43ce-903e-cbc4378c9d99/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 317110673 Source-Link: googleapis/googleapis@fa4d2ec
1 parent 0c4c8a5 commit dd16f4c

35 files changed

+1494
-1166
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
2020
<dependency>
2121
<groupId>com.google.cloud</groupId>
2222
<artifactId>libraries-bom</artifactId>
23-
<version>5.7.0</version>
23+
<version>7.0.0</version>
2424
<type>pom</type>
2525
<scope>import</scope>
2626
</dependency>

google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceClient.java

+99-98
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@
4545
* <pre>
4646
* <code>
4747
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
48-
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
49-
* applicationServiceClient.deleteApplication(name);
48+
* ProfileName parent = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
49+
* Application application = Application.newBuilder().build();
50+
* Application response = applicationServiceClient.createApplication(parent, application);
5051
* }
5152
* </code>
5253
* </pre>
@@ -156,102 +157,6 @@ public ApplicationServiceStub getStub() {
156157
return stub;
157158
}
158159

159-
// AUTO-GENERATED DOCUMENTATION AND METHOD
160-
/**
161-
* Deletes specified application.
162-
*
163-
* <p>Sample code:
164-
*
165-
* <pre><code>
166-
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
167-
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
168-
* applicationServiceClient.deleteApplication(name);
169-
* }
170-
* </code></pre>
171-
*
172-
* @param name Required. The resource name of the application to be deleted.
173-
* <p>The format is
174-
* "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
175-
* For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
176-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
177-
*/
178-
public final void deleteApplication(ApplicationName name) {
179-
DeleteApplicationRequest request =
180-
DeleteApplicationRequest.newBuilder()
181-
.setName(name == null ? null : name.toString())
182-
.build();
183-
deleteApplication(request);
184-
}
185-
186-
// AUTO-GENERATED DOCUMENTATION AND METHOD
187-
/**
188-
* Deletes specified application.
189-
*
190-
* <p>Sample code:
191-
*
192-
* <pre><code>
193-
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
194-
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
195-
* applicationServiceClient.deleteApplication(name.toString());
196-
* }
197-
* </code></pre>
198-
*
199-
* @param name Required. The resource name of the application to be deleted.
200-
* <p>The format is
201-
* "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
202-
* For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
203-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
204-
*/
205-
public final void deleteApplication(String name) {
206-
DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder().setName(name).build();
207-
deleteApplication(request);
208-
}
209-
210-
// AUTO-GENERATED DOCUMENTATION AND METHOD
211-
/**
212-
* Deletes specified application.
213-
*
214-
* <p>Sample code:
215-
*
216-
* <pre><code>
217-
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
218-
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
219-
* DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder()
220-
* .setName(name.toString())
221-
* .build();
222-
* applicationServiceClient.deleteApplication(request);
223-
* }
224-
* </code></pre>
225-
*
226-
* @param request The request object containing all of the parameters for the API call.
227-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
228-
*/
229-
public final void deleteApplication(DeleteApplicationRequest request) {
230-
deleteApplicationCallable().call(request);
231-
}
232-
233-
// AUTO-GENERATED DOCUMENTATION AND METHOD
234-
/**
235-
* Deletes specified application.
236-
*
237-
* <p>Sample code:
238-
*
239-
* <pre><code>
240-
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
241-
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
242-
* DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder()
243-
* .setName(name.toString())
244-
* .build();
245-
* ApiFuture&lt;Void&gt; future = applicationServiceClient.deleteApplicationCallable().futureCall(request);
246-
* // Do something
247-
* future.get();
248-
* }
249-
* </code></pre>
250-
*/
251-
public final UnaryCallable<DeleteApplicationRequest, Empty> deleteApplicationCallable() {
252-
return stub.deleteApplicationCallable();
253-
}
254-
255160
// AUTO-GENERATED DOCUMENTATION AND METHOD
256161
/**
257162
* Creates a new application entity.
@@ -518,6 +423,102 @@ public final UnaryCallable<UpdateApplicationRequest, Application> updateApplicat
518423
return stub.updateApplicationCallable();
519424
}
520425

426+
// AUTO-GENERATED DOCUMENTATION AND METHOD
427+
/**
428+
* Deletes specified application.
429+
*
430+
* <p>Sample code:
431+
*
432+
* <pre><code>
433+
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
434+
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
435+
* applicationServiceClient.deleteApplication(name);
436+
* }
437+
* </code></pre>
438+
*
439+
* @param name Required. The resource name of the application to be deleted.
440+
* <p>The format is
441+
* "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
442+
* For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
443+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
444+
*/
445+
public final void deleteApplication(ApplicationName name) {
446+
DeleteApplicationRequest request =
447+
DeleteApplicationRequest.newBuilder()
448+
.setName(name == null ? null : name.toString())
449+
.build();
450+
deleteApplication(request);
451+
}
452+
453+
// AUTO-GENERATED DOCUMENTATION AND METHOD
454+
/**
455+
* Deletes specified application.
456+
*
457+
* <p>Sample code:
458+
*
459+
* <pre><code>
460+
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
461+
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
462+
* applicationServiceClient.deleteApplication(name.toString());
463+
* }
464+
* </code></pre>
465+
*
466+
* @param name Required. The resource name of the application to be deleted.
467+
* <p>The format is
468+
* "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
469+
* For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
470+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
471+
*/
472+
public final void deleteApplication(String name) {
473+
DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder().setName(name).build();
474+
deleteApplication(request);
475+
}
476+
477+
// AUTO-GENERATED DOCUMENTATION AND METHOD
478+
/**
479+
* Deletes specified application.
480+
*
481+
* <p>Sample code:
482+
*
483+
* <pre><code>
484+
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
485+
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
486+
* DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder()
487+
* .setName(name.toString())
488+
* .build();
489+
* applicationServiceClient.deleteApplication(request);
490+
* }
491+
* </code></pre>
492+
*
493+
* @param request The request object containing all of the parameters for the API call.
494+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
495+
*/
496+
public final void deleteApplication(DeleteApplicationRequest request) {
497+
deleteApplicationCallable().call(request);
498+
}
499+
500+
// AUTO-GENERATED DOCUMENTATION AND METHOD
501+
/**
502+
* Deletes specified application.
503+
*
504+
* <p>Sample code:
505+
*
506+
* <pre><code>
507+
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
508+
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
509+
* DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder()
510+
* .setName(name.toString())
511+
* .build();
512+
* ApiFuture&lt;Void&gt; future = applicationServiceClient.deleteApplicationCallable().futureCall(request);
513+
* // Do something
514+
* future.get();
515+
* }
516+
* </code></pre>
517+
*/
518+
public final UnaryCallable<DeleteApplicationRequest, Empty> deleteApplicationCallable() {
519+
return stub.deleteApplicationCallable();
520+
}
521+
521522
// AUTO-GENERATED DOCUMENTATION AND METHOD
522523
/**
523524
* Lists all applications associated with the profile.

google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceSettings.java

+13-13
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 deleteApplication to 30 seconds:
52+
* <p>For example, to set the total timeout of createApplication to 30 seconds:
5353
*
5454
* <pre>
5555
* <code>
5656
* ApplicationServiceSettings.Builder applicationServiceSettingsBuilder =
5757
* ApplicationServiceSettings.newBuilder();
5858
* applicationServiceSettingsBuilder
59-
* .deleteApplicationSettings()
59+
* .createApplicationSettings()
6060
* .setRetrySettings(
61-
* applicationServiceSettingsBuilder.deleteApplicationSettings().getRetrySettings().toBuilder()
61+
* applicationServiceSettingsBuilder.createApplicationSettings().getRetrySettings().toBuilder()
6262
* .setTotalTimeout(Duration.ofSeconds(30))
6363
* .build());
6464
* ApplicationServiceSettings applicationServiceSettings = applicationServiceSettingsBuilder.build();
@@ -68,11 +68,6 @@
6868
@Generated("by gapic-generator")
6969
@BetaApi
7070
public class ApplicationServiceSettings extends ClientSettings<ApplicationServiceSettings> {
71-
/** Returns the object with the settings used for calls to deleteApplication. */
72-
public UnaryCallSettings<DeleteApplicationRequest, Empty> deleteApplicationSettings() {
73-
return ((ApplicationServiceStubSettings) getStubSettings()).deleteApplicationSettings();
74-
}
75-
7671
/** Returns the object with the settings used for calls to createApplication. */
7772
public UnaryCallSettings<CreateApplicationRequest, Application> createApplicationSettings() {
7873
return ((ApplicationServiceStubSettings) getStubSettings()).createApplicationSettings();
@@ -88,6 +83,11 @@ public UnaryCallSettings<UpdateApplicationRequest, Application> updateApplicatio
8883
return ((ApplicationServiceStubSettings) getStubSettings()).updateApplicationSettings();
8984
}
9085

86+
/** Returns the object with the settings used for calls to deleteApplication. */
87+
public UnaryCallSettings<DeleteApplicationRequest, Empty> deleteApplicationSettings() {
88+
return ((ApplicationServiceStubSettings) getStubSettings()).deleteApplicationSettings();
89+
}
90+
9191
/** Returns the object with the settings used for calls to listApplications. */
9292
public PagedCallSettings<
9393
ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse>
@@ -192,11 +192,6 @@ public Builder applyToAllUnaryMethods(
192192
return this;
193193
}
194194

195-
/** Returns the builder for the settings used for calls to deleteApplication. */
196-
public UnaryCallSettings.Builder<DeleteApplicationRequest, Empty> deleteApplicationSettings() {
197-
return getStubSettingsBuilder().deleteApplicationSettings();
198-
}
199-
200195
/** Returns the builder for the settings used for calls to createApplication. */
201196
public UnaryCallSettings.Builder<CreateApplicationRequest, Application>
202197
createApplicationSettings() {
@@ -214,6 +209,11 @@ public UnaryCallSettings.Builder<GetApplicationRequest, Application> getApplicat
214209
return getStubSettingsBuilder().updateApplicationSettings();
215210
}
216211

212+
/** Returns the builder for the settings used for calls to deleteApplication. */
213+
public UnaryCallSettings.Builder<DeleteApplicationRequest, Empty> deleteApplicationSettings() {
214+
return getStubSettingsBuilder().deleteApplicationSettings();
215+
}
216+
217217
/** Returns the builder for the settings used for calls to listApplications. */
218218
public PagedCallSettings.Builder<
219219
ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse>

0 commit comments

Comments
 (0)