Skip to content
Permalink
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
  • Loading branch information
yoshi-automation committed Jun 22, 2020
1 parent 0c4c8a5 commit dd16f4cc1f4413f283bcc0855185c0c4e4114b16
Showing with 1,494 additions and 1,166 deletions.
  1. +1 −1 README.md
  2. +99 −98 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceClient.java
  3. +13 −13 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ApplicationServiceSettings.java
  4. +99 −98 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceClient.java
  5. +13 −13 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompanyServiceSettings.java
  6. +107 −106 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceClient.java
  7. +13 −13 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceSettings.java
  8. +99 −98 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceClient.java
  9. +13 −13 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceSettings.java
  10. +95 −94 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceClient.java
  11. +13 −13 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceSettings.java
  12. +15 −10 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/package-info.java
  13. +4 −4 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ApplicationServiceStub.java
  14. +183 −41 ...oud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ApplicationServiceStubSettings.java
  15. +4 −4 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompanyServiceStub.java
  16. +52 −40 ...e-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompanyServiceStubSettings.java
  17. +10 −8 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompletionStubSettings.java
  18. +10 −14 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/EventServiceStubSettings.java
  19. +32 −32 ...e-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcApplicationServiceStub.java
  20. +28 −28 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcCompanyServiceStub.java
  21. +28 −28 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcJobServiceStub.java
  22. +28 −28 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcProfileServiceStub.java
  23. +28 −28 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcTenantServiceStub.java
  24. +4 −4 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/JobServiceStub.java
  25. +66 −54 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/JobServiceStubSettings.java
  26. +4 −4 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ProfileServiceStub.java
  27. +56 −44 ...e-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ProfileServiceStubSettings.java
  28. +4 −4 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStub.java
  29. +182 −40 ...le-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStubSettings.java
  30. +39 −39 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ApplicationServiceClientTest.java
  31. +38 −38 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompanyServiceClientTest.java
  32. +37 −37 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/JobServiceClientTest.java
  33. +37 −37 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ProfileServiceClientTest.java
  34. +37 −37 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/TenantServiceClientTest.java
  35. +3 −3 synth.metadata
@@ -20,7 +20,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>5.7.0</version>
<version>7.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@@ -45,8 +45,9 @@
* <pre>
* <code>
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
* applicationServiceClient.deleteApplication(name);
* ProfileName parent = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
* Application application = Application.newBuilder().build();
* Application response = applicationServiceClient.createApplication(parent, application);
* }
* </code>
* </pre>
@@ -156,102 +157,6 @@ public ApplicationServiceStub getStub() {
return stub;
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes specified application.
*
* <p>Sample code:
*
* <pre><code>
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
* applicationServiceClient.deleteApplication(name);
* }
* </code></pre>
*
* @param name Required. The resource name of the application to be deleted.
* <p>The format is
* "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
* For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteApplication(ApplicationName name) {
DeleteApplicationRequest request =
DeleteApplicationRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
deleteApplication(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes specified application.
*
* <p>Sample code:
*
* <pre><code>
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
* applicationServiceClient.deleteApplication(name.toString());
* }
* </code></pre>
*
* @param name Required. The resource name of the application to be deleted.
* <p>The format is
* "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
* For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteApplication(String name) {
DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder().setName(name).build();
deleteApplication(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes specified application.
*
* <p>Sample code:
*
* <pre><code>
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
* DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder()
* .setName(name.toString())
* .build();
* applicationServiceClient.deleteApplication(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 void deleteApplication(DeleteApplicationRequest request) {
deleteApplicationCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes specified application.
*
* <p>Sample code:
*
* <pre><code>
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
* DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;Void&gt; future = applicationServiceClient.deleteApplicationCallable().futureCall(request);
* // Do something
* future.get();
* }
* </code></pre>
*/
public final UnaryCallable<DeleteApplicationRequest, Empty> deleteApplicationCallable() {
return stub.deleteApplicationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Creates a new application entity.
@@ -518,6 +423,102 @@ public final UnaryCallable<UpdateApplicationRequest, Application> updateApplicat
return stub.updateApplicationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes specified application.
*
* <p>Sample code:
*
* <pre><code>
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
* applicationServiceClient.deleteApplication(name);
* }
* </code></pre>
*
* @param name Required. The resource name of the application to be deleted.
* <p>The format is
* "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
* For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteApplication(ApplicationName name) {
DeleteApplicationRequest request =
DeleteApplicationRequest.newBuilder()
.setName(name == null ? null : name.toString())
.build();
deleteApplication(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes specified application.
*
* <p>Sample code:
*
* <pre><code>
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
* applicationServiceClient.deleteApplication(name.toString());
* }
* </code></pre>
*
* @param name Required. The resource name of the application to be deleted.
* <p>The format is
* "projects/{project_id}/tenants/{tenant_id}/profiles/{profile_id}/applications/{application_id}".
* For example, "projects/foo/tenants/bar/profiles/baz/applications/qux".
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteApplication(String name) {
DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder().setName(name).build();
deleteApplication(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes specified application.
*
* <p>Sample code:
*
* <pre><code>
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
* DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder()
* .setName(name.toString())
* .build();
* applicationServiceClient.deleteApplication(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 void deleteApplication(DeleteApplicationRequest request) {
deleteApplicationCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Deletes specified application.
*
* <p>Sample code:
*
* <pre><code>
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
* DeleteApplicationRequest request = DeleteApplicationRequest.newBuilder()
* .setName(name.toString())
* .build();
* ApiFuture&lt;Void&gt; future = applicationServiceClient.deleteApplicationCallable().futureCall(request);
* // Do something
* future.get();
* }
* </code></pre>
*/
public final UnaryCallable<DeleteApplicationRequest, Empty> deleteApplicationCallable() {
return stub.deleteApplicationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD
/**
* Lists all applications associated with the profile.
@@ -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 deleteApplication to 30 seconds:
* <p>For example, to set the total timeout of createApplication to 30 seconds:
*
* <pre>
* <code>
* ApplicationServiceSettings.Builder applicationServiceSettingsBuilder =
* ApplicationServiceSettings.newBuilder();
* applicationServiceSettingsBuilder
* .deleteApplicationSettings()
* .createApplicationSettings()
* .setRetrySettings(
* applicationServiceSettingsBuilder.deleteApplicationSettings().getRetrySettings().toBuilder()
* applicationServiceSettingsBuilder.createApplicationSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ApplicationServiceSettings applicationServiceSettings = applicationServiceSettingsBuilder.build();
@@ -68,11 +68,6 @@
@Generated("by gapic-generator")
@BetaApi
public class ApplicationServiceSettings extends ClientSettings<ApplicationServiceSettings> {
/** Returns the object with the settings used for calls to deleteApplication. */
public UnaryCallSettings<DeleteApplicationRequest, Empty> deleteApplicationSettings() {
return ((ApplicationServiceStubSettings) getStubSettings()).deleteApplicationSettings();
}

/** Returns the object with the settings used for calls to createApplication. */
public UnaryCallSettings<CreateApplicationRequest, Application> createApplicationSettings() {
return ((ApplicationServiceStubSettings) getStubSettings()).createApplicationSettings();
@@ -88,6 +83,11 @@ public UnaryCallSettings<UpdateApplicationRequest, Application> updateApplicatio
return ((ApplicationServiceStubSettings) getStubSettings()).updateApplicationSettings();
}

/** Returns the object with the settings used for calls to deleteApplication. */
public UnaryCallSettings<DeleteApplicationRequest, Empty> deleteApplicationSettings() {
return ((ApplicationServiceStubSettings) getStubSettings()).deleteApplicationSettings();
}

/** Returns the object with the settings used for calls to listApplications. */
public PagedCallSettings<
ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse>
@@ -192,11 +192,6 @@ public Builder applyToAllUnaryMethods(
return this;
}

/** Returns the builder for the settings used for calls to deleteApplication. */
public UnaryCallSettings.Builder<DeleteApplicationRequest, Empty> deleteApplicationSettings() {
return getStubSettingsBuilder().deleteApplicationSettings();
}

/** Returns the builder for the settings used for calls to createApplication. */
public UnaryCallSettings.Builder<CreateApplicationRequest, Application>
createApplicationSettings() {
@@ -214,6 +209,11 @@ public UnaryCallSettings.Builder<GetApplicationRequest, Application> getApplicat
return getStubSettingsBuilder().updateApplicationSettings();
}

/** Returns the builder for the settings used for calls to deleteApplication. */
public UnaryCallSettings.Builder<DeleteApplicationRequest, Empty> deleteApplicationSettings() {
return getStubSettingsBuilder().deleteApplicationSettings();
}

/** Returns the builder for the settings used for calls to listApplications. */
public PagedCallSettings.Builder<
ListApplicationsRequest, ListApplicationsResponse, ListApplicationsPagedResponse>

0 comments on commit dd16f4c

Please sign in to comment.