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

Commit

Permalink
Browse files Browse the repository at this point in the history
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 6f58655
Show file tree
Hide file tree
Showing 67 changed files with 3,286 additions and 2,531 deletions.
50 changes: 50 additions & 0 deletions google-cloud-recommendations-ai/clirr-ignored-differences.xml
@@ -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.

Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand Down Expand Up @@ -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() {
Expand All @@ -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);
Expand Down

0 comments on commit 6f58655

Please sign in to comment.