Skip to content
Permalink
Browse files
feat(v1beta1)!: add resource names and switch to gapic v2 configurati…
…on (#49)

* chore: enable gapicv2 and annotate protos for recommendationengine/v1beta1 API

Committer: @miraleung
PiperOrigin-RevId: 309426927

Source-Author: Google APIs <noreply@google.com>
Source-Date: Fri May 1 10:08:56 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: aaff764c185e18a6c73227357c3df5fa60fec85a
Source-Link: googleapis/googleapis@aaff764

* chore: allow breaking resource name changes

Co-authored-by: Jeff Ching <chingor@google.com>
  • Loading branch information
yoshi-automation and chingor13 committed May 4, 2020
1 parent 0a33bca commit 6f58655d78b0f61819f885e21f7bee616771950d
Showing with 3,286 additions and 2,531 deletions.
  1. +50 −0 google-cloud-recommendations-ai/clirr-ignored-differences.xml
  2. +421 −345 ...ndations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/CatalogServiceClient.java
  3. +42 −42 ...ations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/CatalogServiceSettings.java
  4. +168 −248 ...i/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionApiKeyRegistryClient.java
  5. +18 −18 ...src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionApiKeyRegistrySettings.java
  6. +113 −86 ...tions-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionServiceClient.java
  7. +1 −1 ...ons-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionServiceSettings.java
  8. +533 −383 ...ations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/UserEventServiceClient.java
  9. +34 −34 ...ions-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/UserEventServiceSettings.java
  10. +8 −14 ...-recommendations-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/package-info.java
  11. +15 −15 ...tions-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/CatalogServiceStub.java
  12. +82 −82 .../src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/CatalogServiceStubSettings.java
  13. +81 −81 ...s-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/GrpcCatalogServiceStub.java
  14. +38 −38 ...ain/java/com/google/cloud/recommendationengine/v1beta1/stub/GrpcPredictionApiKeyRegistryStub.java
  15. +80 −80 ...ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/GrpcUserEventServiceStub.java
  16. +6 −6 ...rc/main/java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionApiKeyRegistryStub.java
  17. +36 −36 ...java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionApiKeyRegistryStubSettings.java
  18. +1 −1 ...c/main/java/com/google/cloud/recommendationengine/v1beta1/stub/PredictionServiceStubSettings.java
  19. +17 −17 ...ons-ai/src/main/java/com/google/cloud/recommendationengine/v1beta1/stub/UserEventServiceStub.java
  20. +72 −72 ...rc/main/java/com/google/cloud/recommendationengine/v1beta1/stub/UserEventServiceStubSettings.java
  21. +123 −132 ...ions-ai/src/test/java/com/google/cloud/recommendationengine/v1beta1/CatalogServiceClientTest.java
  22. +64 −68 ...c/test/java/com/google/cloud/recommendationengine/v1beta1/PredictionApiKeyRegistryClientTest.java
  23. +7 −13 ...s-ai/src/test/java/com/google/cloud/recommendationengine/v1beta1/PredictionServiceClientTest.java
  24. +132 −142 ...ns-ai/src/test/java/com/google/cloud/recommendationengine/v1beta1/UserEventServiceClientTest.java
  25. +87 −70 ...v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/CatalogServiceOuterClass.java
  26. +61 −47 ...-v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/CollectUserEventRequest.java
  27. +17 −13 ...src/main/java/com/google/cloud/recommendationengine/v1beta1/CollectUserEventRequestOrBuilder.java
  28. +21 −7 ...v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/CreateCatalogItemRequest.java
  29. +6 −2 ...rc/main/java/com/google/cloud/recommendationengine/v1beta1/CreateCatalogItemRequestOrBuilder.java
  30. +33 −19 ...java/com/google/cloud/recommendationengine/v1beta1/CreatePredictionApiKeyRegistrationRequest.java
  31. +9 −5 ...google/cloud/recommendationengine/v1beta1/CreatePredictionApiKeyRegistrationRequestOrBuilder.java
  32. +21 −7 ...v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/DeleteCatalogItemRequest.java
  33. +6 −2 ...rc/main/java/com/google/cloud/recommendationengine/v1beta1/DeleteCatalogItemRequestOrBuilder.java
  34. +21 −7 ...java/com/google/cloud/recommendationengine/v1beta1/DeletePredictionApiKeyRegistrationRequest.java
  35. +6 −2 ...google/cloud/recommendationengine/v1beta1/DeletePredictionApiKeyRegistrationRequestOrBuilder.java
  36. +21 −7 ...ai-v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/GetCatalogItemRequest.java
  37. +6 −2 ...1/src/main/java/com/google/cloud/recommendationengine/v1beta1/GetCatalogItemRequestOrBuilder.java
  38. +69 −58 ...ecommendations-ai-v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/Import.java
  39. +21 −7 ...1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/ImportCatalogItemsRequest.java
  40. +6 −2 ...c/main/java/com/google/cloud/recommendationengine/v1beta1/ImportCatalogItemsRequestOrBuilder.java
  41. +35 −14 ...-v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/ImportUserEventsRequest.java
  42. +10 −4 ...src/main/java/com/google/cloud/recommendationengine/v1beta1/ImportUserEventsRequestOrBuilder.java
  43. +21 −7 ...-v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/ListCatalogItemsRequest.java
  44. +6 −2 ...src/main/java/com/google/cloud/recommendationengine/v1beta1/ListCatalogItemsRequestOrBuilder.java
  45. +21 −7 .../java/com/google/cloud/recommendationengine/v1beta1/ListPredictionApiKeyRegistrationsRequest.java
  46. +6 −2 .../google/cloud/recommendationengine/v1beta1/ListPredictionApiKeyRegistrationsRequestOrBuilder.java
  47. +21 −7 ...ai-v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/ListUserEventsRequest.java
  48. +6 −2 ...1/src/main/java/com/google/cloud/recommendationengine/v1beta1/ListUserEventsRequestOrBuilder.java
  49. +21 −7 ...ations-ai-v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictRequest.java
  50. +6 −2 ...-v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictRequestOrBuilder.java
  51. +65 −50 .../src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionApikeyRegistryService.java
  52. +53 −47 ...eta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/PredictionServiceOuterClass.java
  53. +21 −7 ...i-v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/PurgeUserEventsRequest.java
  54. +6 −2 .../src/main/java/com/google/cloud/recommendationengine/v1beta1/PurgeUserEventsRequestOrBuilder.java
  55. +33 −31 ...v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/UpdateCatalogItemRequest.java
  56. +9 −8 ...rc/main/java/com/google/cloud/recommendationengine/v1beta1/UpdateCatalogItemRequestOrBuilder.java
  57. +82 −69 ...beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/UserEventServiceOuterClass.java
  58. +21 −7 ...ai-v1beta1/src/main/java/com/google/cloud/recommendationengine/v1beta1/WriteUserEventRequest.java
  59. +6 −2 ...1/src/main/java/com/google/cloud/recommendationengine/v1beta1/WriteUserEventRequestOrBuilder.java
  60. +78 −0 ...1beta1/src/main/java/google/cloud/recommendationengine/v1beta1/RecommendationengineResources.java
  61. +46 −11 ...dations-ai-v1beta1/src/main/proto/google/cloud/recommendationengine/v1beta1/catalog_service.proto
  62. +18 −4 ...-recommendations-ai-v1beta1/src/main/proto/google/cloud/recommendationengine/v1beta1/import.proto
  63. +37 −8 ...src/main/proto/google/cloud/recommendationengine/v1beta1/prediction_apikey_registry_service.proto
  64. +12 −3 ...ions-ai-v1beta1/src/main/proto/google/cloud/recommendationengine/v1beta1/prediction_service.proto
  65. +46 −0 ...ta1/src/main/proto/google/cloud/recommendationengine/v1beta1/recommendationengine_resources.proto
  66. +44 −14 ...ions-ai-v1beta1/src/main/proto/google/cloud/recommendationengine/v1beta1/user_event_service.proto
  67. +3 −3 synth.metadata
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- see http://www.mojohaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
<differences>
<!-- TODO: remove after 0.2.0 is released -->
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/recommendationengine/v1beta1/CatalogServiceClient</className>
<method>java.lang.String format*Name(*)</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/recommendationengine/v1beta1/CatalogServiceClient</className>
<method>java.lang.String parse*Name(*)</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/recommendationengine/v1beta1/PredictionApiKeyRegistryClient</className>
<method>java.lang.String format*Name(*)</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/recommendationengine/v1beta1/PredictionApiKeyRegistryClient</className>
<method>java.lang.String parse*Name(*)</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/recommendationengine/v1beta1/PredictionServiceClient</className>
<method>java.lang.String format*Name(*)</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/recommendationengine/v1beta1/PredictionServiceClient</className>
<method>java.lang.String parse*Name(*)</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/recommendationengine/v1beta1/UserEventServiceClient</className>
<method>java.lang.String format*Name(*)</method>
</difference>
<difference>
<differenceType>7002</differenceType>
<className>com/google/cloud/recommendationengine/v1beta1/UserEventServiceClient</className>
<method>java.lang.String parse*Name(*)</method>
</difference>
<difference>
<differenceType>7004</differenceType>
<className>com/google/cloud/recommendationengine/v1beta1/CatalogServiceClient</className>
<method>com.google.cloud.recommendationengine.v1beta1.CatalogItem updateCatalogItem(java.lang.String, com.google.cloud.recommendationengine.v1beta1.CatalogItem)</method>
</difference>
</differences>

Large diffs are not rendered by default.

@@ -52,16 +52,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 createCatalogItem to 30 seconds:
* <p>For example, to set the total timeout of deleteCatalogItem to 30 seconds:
*
* <pre>
* <code>
* CatalogServiceSettings.Builder catalogServiceSettingsBuilder =
* CatalogServiceSettings.newBuilder();
* catalogServiceSettingsBuilder
* .createCatalogItemSettings()
* .deleteCatalogItemSettings()
* .setRetrySettings(
* catalogServiceSettingsBuilder.createCatalogItemSettings().getRetrySettings().toBuilder()
* catalogServiceSettingsBuilder.deleteCatalogItemSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* CatalogServiceSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
@@ -71,6 +71,25 @@
@Generated("by gapic-generator")
@BetaApi
public class CatalogServiceSettings extends ClientSettings<CatalogServiceSettings> {
/** Returns the object with the settings used for calls to deleteCatalogItem. */
public UnaryCallSettings<DeleteCatalogItemRequest, Empty> deleteCatalogItemSettings() {
return ((CatalogServiceStubSettings) getStubSettings()).deleteCatalogItemSettings();
}

/** Returns the object with the settings used for calls to importCatalogItems. */
public UnaryCallSettings<ImportCatalogItemsRequest, Operation> importCatalogItemsSettings() {
return ((CatalogServiceStubSettings) getStubSettings()).importCatalogItemsSettings();
}

/** Returns the object with the settings used for calls to importCatalogItems. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<
ImportCatalogItemsRequest, ImportCatalogItemsResponse, ImportMetadata>
importCatalogItemsOperationSettings() {
return ((CatalogServiceStubSettings) getStubSettings()).importCatalogItemsOperationSettings();
}

/** Returns the object with the settings used for calls to createCatalogItem. */
public UnaryCallSettings<CreateCatalogItemRequest, CatalogItem> createCatalogItemSettings() {
return ((CatalogServiceStubSettings) getStubSettings()).createCatalogItemSettings();
@@ -93,25 +112,6 @@ public UnaryCallSettings<UpdateCatalogItemRequest, CatalogItem> updateCatalogIte
return ((CatalogServiceStubSettings) getStubSettings()).updateCatalogItemSettings();
}

/** Returns the object with the settings used for calls to deleteCatalogItem. */
public UnaryCallSettings<DeleteCatalogItemRequest, Empty> deleteCatalogItemSettings() {
return ((CatalogServiceStubSettings) getStubSettings()).deleteCatalogItemSettings();
}

/** Returns the object with the settings used for calls to importCatalogItems. */
public UnaryCallSettings<ImportCatalogItemsRequest, Operation> importCatalogItemsSettings() {
return ((CatalogServiceStubSettings) getStubSettings()).importCatalogItemsSettings();
}

/** Returns the object with the settings used for calls to importCatalogItems. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings<
ImportCatalogItemsRequest, ImportCatalogItemsResponse, ImportMetadata>
importCatalogItemsOperationSettings() {
return ((CatalogServiceStubSettings) getStubSettings()).importCatalogItemsOperationSettings();
}

public static final CatalogServiceSettings create(CatalogServiceStubSettings stub)
throws IOException {
return new CatalogServiceSettings.Builder(stub.toBuilder()).build();
@@ -209,6 +209,26 @@ public Builder applyToAllUnaryMethods(
return this;
}

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

/** Returns the builder for the settings used for calls to importCatalogItems. */
public UnaryCallSettings.Builder<ImportCatalogItemsRequest, Operation>
importCatalogItemsSettings() {
return getStubSettingsBuilder().importCatalogItemsSettings();
}

/** Returns the builder for the settings used for calls to importCatalogItems. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
ImportCatalogItemsRequest, ImportCatalogItemsResponse, ImportMetadata>
importCatalogItemsOperationSettings() {
return getStubSettingsBuilder().importCatalogItemsOperationSettings();
}

/** Returns the builder for the settings used for calls to createCatalogItem. */
public UnaryCallSettings.Builder<CreateCatalogItemRequest, CatalogItem>
createCatalogItemSettings() {
@@ -233,26 +253,6 @@ public UnaryCallSettings.Builder<GetCatalogItemRequest, CatalogItem> getCatalogI
return getStubSettingsBuilder().updateCatalogItemSettings();
}

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

/** Returns the builder for the settings used for calls to importCatalogItems. */
public UnaryCallSettings.Builder<ImportCatalogItemsRequest, Operation>
importCatalogItemsSettings() {
return getStubSettingsBuilder().importCatalogItemsSettings();
}

/** Returns the builder for the settings used for calls to importCatalogItems. */
@BetaApi(
"The surface for long-running operations is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
ImportCatalogItemsRequest, ImportCatalogItemsResponse, ImportMetadata>
importCatalogItemsOperationSettings() {
return getStubSettingsBuilder().importCatalogItemsOperationSettings();
}

@Override
public CatalogServiceSettings build() throws IOException {
return new CatalogServiceSettings(this);

0 comments on commit 6f58655

Please sign in to comment.