Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generation_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
gapic_generator_version: 2.59.0
googleapis_commitish: fc1e32c211bbb46c7213ffa68fe3273da16ab358
googleapis_commitish: 8a883235bc76e941ef745a5b5465878dadc9c440
libraries_bom_version: 26.61.0

# the libraries are ordered with respect to library name, which is
Expand Down
8 changes: 4 additions & 4 deletions java-retail/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-retail</artifactId>
<version>2.65.0</version>
<version>2.68.0</version>
</dependency>
```

If you are using Gradle without BOM, add this to your dependencies:

```Groovy
implementation 'com.google.cloud:google-cloud-retail:2.65.0'
implementation 'com.google.cloud:google-cloud-retail:2.68.0'
```

If you are using SBT, add this to your dependencies:

```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-retail" % "2.65.0"
libraryDependencies += "com.google.cloud" % "google-cloud-retail" % "2.68.0"
```

## Authentication
Expand Down Expand Up @@ -194,7 +194,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-retail.svg
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-retail/2.65.0
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-retail/2.68.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,16 @@
* </tr>
* <tr>
* <td><p> SetDefaultBranch</td>
* <td><p> Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts] will treat requests using "default_branch" to the actual branch id set as default.
* <p> For example, if `projects/&#42;/locations/&#42;/catalogs/&#42;/branches/1` is set as default, setting [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to `projects/&#42;/locations/&#42;/catalogs/&#42;/branches/default_branch` is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to `projects/&#42;/locations/&#42;/catalogs/&#42;/branches/1`.
* <p> Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using `projects/&#42;/locations/&#42;/catalogs/&#42;/branches/default_branch` as [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to route the traffic to this staging branch.
* <p> CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one.
* <p> More specifically:
* <p> &#42; PredictionService will only return product IDs from branch {newBranch}. &#42; SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set). &#42; UserEventService will only join events with products from branch {newBranch}.</td>
* <td><p> Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts] will treat requests using "default_branch" to the actual branch id set as default.
* <p> For example, if `projects/&#42;/locations/&#42;/catalogs/&#42;/branches/1` is set as default, setting [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to `projects/&#42;/locations/&#42;/catalogs/&#42;/branches/default_branch` is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to `projects/&#42;/locations/&#42;/catalogs/&#42;/branches/1`.
* <p> Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using `projects/&#42;/locations/&#42;/catalogs/&#42;/branches/default_branch` as [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to route the traffic to this staging branch.
* <p> CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one.
* <p> More specifically:
* <ul>
* <li> PredictionService will only return product IDs from branch {newBranch}.
* <li> SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set).
* <li> UserEventService will only join events with products from branch {newBranch}.
* </ul></td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
Expand All @@ -128,7 +132,7 @@
* </tr>
* <tr>
* <td><p> GetDefaultBranch</td>
* <td><p> Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.</td>
* <td><p> Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.</td>
* <td>
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
* <ul>
Expand Down Expand Up @@ -657,9 +661,12 @@ public final UnaryCallable<UpdateCatalogRequest, Catalog> updateCatalogCallable(
*
* <p>More specifically:
*
* <p>&#42; PredictionService will only return product IDs from branch {newBranch}. &#42;
* SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly
* set). &#42; UserEventService will only join events with products from branch {newBranch}.
* <ul>
* <li>PredictionService will only return product IDs from branch {newBranch}.
* <li>SearchService will only return product IDs from branch {newBranch} (if branch is not
* explicitly set).
* <li>UserEventService will only join events with products from branch {newBranch}.
* </ul>
*
* <p>Sample code:
*
Expand Down Expand Up @@ -713,9 +720,12 @@ public final void setDefaultBranch(CatalogName catalog) {
*
* <p>More specifically:
*
* <p>&#42; PredictionService will only return product IDs from branch {newBranch}. &#42;
* SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly
* set). &#42; UserEventService will only join events with products from branch {newBranch}.
* <ul>
* <li>PredictionService will only return product IDs from branch {newBranch}.
* <li>SearchService will only return product IDs from branch {newBranch} (if branch is not
* explicitly set).
* <li>UserEventService will only join events with products from branch {newBranch}.
* </ul>
*
* <p>Sample code:
*
Expand Down Expand Up @@ -767,9 +777,12 @@ public final void setDefaultBranch(String catalog) {
*
* <p>More specifically:
*
* <p>&#42; PredictionService will only return product IDs from branch {newBranch}. &#42;
* SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly
* set). &#42; UserEventService will only join events with products from branch {newBranch}.
* <ul>
* <li>PredictionService will only return product IDs from branch {newBranch}.
* <li>SearchService will only return product IDs from branch {newBranch} (if branch is not
* explicitly set).
* <li>UserEventService will only join events with products from branch {newBranch}.
* </ul>
*
* <p>Sample code:
*
Expand Down Expand Up @@ -825,9 +838,12 @@ public final void setDefaultBranch(SetDefaultBranchRequest request) {
*
* <p>More specifically:
*
* <p>&#42; PredictionService will only return product IDs from branch {newBranch}. &#42;
* SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly
* set). &#42; UserEventService will only join events with products from branch {newBranch}.
* <ul>
* <li>PredictionService will only return product IDs from branch {newBranch}.
* <li>SearchService will only return product IDs from branch {newBranch} (if branch is not
* explicitly set).
* <li>UserEventService will only join events with products from branch {newBranch}.
* </ul>
*
* <p>Sample code:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
* .setLanguageCode("languageCode-2092349083")
* .setRegionCode("regionCode-1991004415")
* .setPlaceId("placeId-494224254")
* .putAllUserAttributes(new HashMap<String, StringList>())
* .build();
* for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) {
* // doThingsWith(element);
Expand Down Expand Up @@ -263,6 +264,7 @@ public SearchServiceStub getStub() {
* .setLanguageCode("languageCode-2092349083")
* .setRegionCode("regionCode-1991004415")
* .setPlaceId("placeId-494224254")
* .putAllUserAttributes(new HashMap<String, StringList>())
* .build();
* for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) {
* // doThingsWith(element);
Expand Down Expand Up @@ -323,6 +325,7 @@ public final SearchPagedResponse search(SearchRequest request) {
* .setLanguageCode("languageCode-2092349083")
* .setRegionCode("regionCode-1991004415")
* .setPlaceId("placeId-494224254")
* .putAllUserAttributes(new HashMap<String, StringList>())
* .build();
* ApiFuture<SearchResponse.SearchResult> future =
* searchServiceClient.searchPagedCallable().futureCall(request);
Expand Down Expand Up @@ -383,6 +386,7 @@ public final UnaryCallable<SearchRequest, SearchPagedResponse> searchPagedCallab
* .setLanguageCode("languageCode-2092349083")
* .setRegionCode("regionCode-1991004415")
* .setPlaceId("placeId-494224254")
* .putAllUserAttributes(new HashMap<String, StringList>())
* .build();
* while (true) {
* SearchResponse response = searchServiceClient.searchCallable().call(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
* .setLanguageCode("languageCode-2092349083")
* .setRegionCode("regionCode-1991004415")
* .setPlaceId("placeId-494224254")
* .putAllUserAttributes(new HashMap<String, StringList>())
* .build();
* for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) {
* // doThingsWith(element);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.retail.v2.DoubleList",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.retail.v2.DoubleList$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.retail.v2.ExperimentInfo",
"queryAllDeclaredConstructors": true,
Expand Down Expand Up @@ -3842,6 +3860,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.retail.v2.StringList",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.retail.v2.StringList$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.retail.v2.Tile",
"queryAllDeclaredConstructors": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public void searchTest() throws Exception {
.setLanguageCode("languageCode-2092349083")
.setRegionCode("regionCode-1991004415")
.setPlaceId("placeId-494224254")
.putAllUserAttributes(new HashMap<String, StringList>())
.build();

SearchPagedResponse pagedListResponse = client.search(request);
Expand Down Expand Up @@ -181,6 +182,7 @@ public void searchExceptionTest() throws Exception {
.setLanguageCode("languageCode-2092349083")
.setRegionCode("regionCode-1991004415")
.setPlaceId("placeId-494224254")
.putAllUserAttributes(new HashMap<String, StringList>())
.build();
client.search(request);
Assert.fail("No exception raised");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public void searchTest() throws Exception {
.setLanguageCode("languageCode-2092349083")
.setRegionCode("regionCode-1991004415")
.setPlaceId("placeId-494224254")
.putAllUserAttributes(new HashMap<String, StringList>())
.build();

SearchPagedResponse pagedListResponse = client.search(request);
Expand Down Expand Up @@ -165,6 +166,7 @@ public void searchTest() throws Exception {
Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode());
Assert.assertEquals(request.getRegionCode(), actualRequest.getRegionCode());
Assert.assertEquals(request.getPlaceId(), actualRequest.getPlaceId());
Assert.assertEquals(request.getUserAttributesMap(), actualRequest.getUserAttributesMap());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
Expand Down Expand Up @@ -207,6 +209,7 @@ public void searchExceptionTest() throws Exception {
.setLanguageCode("languageCode-2092349083")
.setRegionCode("regionCode-1991004415")
.setPlaceId("placeId-494224254")
.putAllUserAttributes(new HashMap<String, StringList>())
.build();
client.search(request);
Assert.fail("No exception raised");
Expand Down
Loading
Loading