Skip to content
Permalink
Browse files
feat!: adopt the new multi-pattern resource names (#88)
- Delete `TenantOrProjectName`.
- Generate overloads that take `TenantName` and `ProjectName` respectively where `TenantOrProjectName` was originally used.
- Delete per-pattern resource name helper classes: `CompanyWithTenantName`, `CompanyWithoutTenantName`, `JobWithTenantName`, `JobWithoutTenantName`, `CompanyOldName`, `CompanyNewName`, `JobOldName`, `JobNewName`.
- Delete resource name factory classes `JobNames`, `CompanyNames`, `TenantOrProjectNames` and untyped resource name classes `UntypedJobName`, `UntypedTenantName` and `UntypedTenantOrProjectName`.
  • Loading branch information
yihanzhen committed Mar 13, 2020
1 parent b20fbf8 commit 0a8a4c9141e5b024ab4106975690f6b3f1c91bf3
Showing with 3,359 additions and 4,387 deletions.
  1. +11 −0 google-cloud-talent/clirr-ignored-differences.xml
  2. +98 −99 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. +159 −100 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. +3 −3 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/CompletionClient.java
  7. +40 −6 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/EventServiceClient.java
  8. +669 −432 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceClient.java
  9. +71 −71 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/JobServiceSettings.java
  10. +290 −291 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceClient.java
  11. +27 −27 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/ProfileServiceSettings.java
  12. +94 −95 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceClient.java
  13. +13 −13 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/TenantServiceSettings.java
  14. +53 −58 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/package-info.java
  15. +4 −4 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ApplicationServiceStub.java
  16. +27 −27 ...oud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ApplicationServiceStubSettings.java
  17. +4 −4 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompanyServiceStub.java
  18. +26 −26 ...e-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/CompanyServiceStubSettings.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. +132 −132 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/GrpcJobServiceStub.java
  22. +70 −70 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. +26 −26 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/JobServiceStub.java
  25. +137 −137 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/JobServiceStubSettings.java
  26. +13 −13 google-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/ProfileServiceStub.java
  27. +100 −100 ...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. +26 −26 ...le-cloud-talent/src/main/java/com/google/cloud/talent/v4beta1/stub/TenantServiceStubSettings.java
  30. +63 −63 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ApplicationServiceClientTest.java
  31. +61 −61 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompanyServiceClientTest.java
  32. +15 −15 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/CompletionClientTest.java
  33. +15 −15 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/EventServiceClientTest.java
  34. +166 −166 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/JobServiceClientTest.java
  35. +114 −114 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/ProfileServiceClientTest.java
  36. +49 −49 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/TenantServiceClientTest.java
  37. +8 −13 google-cloud-talent/src/test/java/com/google/cloud/talent/v4beta1/it/ITSystemTest.java
  38. +74 −0 proto-google-cloud-talent-v4beta1/clirr-ignored-differences.xml
  39. +291 −1 proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyName.java
  40. +0 −38 proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyNames.java
  41. +0 −209 proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyNewName.java
  42. +0 −181 proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyOldName.java
  43. +0 −209 ...gle-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyWithTenantName.java
  44. +0 −181 ...-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/CompanyWithoutTenantName.java
  45. +284 −1 proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobName.java
  46. +0 −38 proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobNames.java
  47. +0 −203 proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobNewName.java
  48. +0 −181 proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobOldName.java
  49. +0 −203 ...-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobWithTenantName.java
  50. +0 −181 ...ogle-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/JobWithoutTenantName.java
  51. +2 −1 proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/ProjectName.java
  52. +2 −1 proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantName.java
  53. +0 −25 ...oogle-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantOrProjectName.java
  54. +0 −38 ...ogle-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/TenantOrProjectNames.java
  55. +0 −106 ...google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UntypedCompanyName.java
  56. +0 −106 proto-google-cloud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UntypedJobName.java
  57. +0 −106 ...loud-talent-v4beta1/src/main/java/com/google/cloud/talent/v4beta1/UntypedTenantOrProjectName.java
  58. +4 −4 synth.metadata
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>
<!--TODO: To be removed after 0.36.0-->
<difference>
<differenceType>7005</differenceType>
<className>com/google/cloud/talent/v4beta1/*ServiceClient</className>
<method>* *(com.google.cloud.talent.v4beta1.TenantOrProjectName*)</method>
<to>* *(com.google.cloud.talent.v4beta1.ProjectName*)</to>
</difference>
</differences>
@@ -45,9 +45,8 @@
* <pre>
* <code>
* try (ApplicationServiceClient applicationServiceClient = ApplicationServiceClient.create()) {
* ProfileName parent = ProfileName.of("[PROJECT]", "[TENANT]", "[PROFILE]");
* Application application = Application.newBuilder().build();
* Application response = applicationServiceClient.createApplication(parent, application);
* ApplicationName name = ApplicationName.of("[PROJECT]", "[TENANT]", "[PROFILE]", "[APPLICATION]");
* applicationServiceClient.deleteApplication(name);
* }
* </code>
* </pre>
@@ -157,6 +156,102 @@ 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.
@@ -423,102 +518,6 @@ 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 createApplication to 30 seconds:
* <p>For example, to set the total timeout of deleteApplication to 30 seconds:
*
* <pre>
* <code>
* ApplicationServiceSettings.Builder applicationServiceSettingsBuilder =
* ApplicationServiceSettings.newBuilder();
* applicationServiceSettingsBuilder
* .createApplicationSettings()
* .deleteApplicationSettings()
* .setRetrySettings(
* applicationServiceSettingsBuilder.createApplicationSettings().getRetrySettings().toBuilder()
* applicationServiceSettingsBuilder.deleteApplicationSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* ApplicationServiceSettings applicationServiceSettings = applicationServiceSettingsBuilder.build();
@@ -68,6 +68,11 @@
@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();
@@ -83,11 +88,6 @@ 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,6 +192,11 @@ 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() {
@@ -209,11 +214,6 @@ 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 0a8a4c9

Please sign in to comment.