Skip to content

Commit 0f5f4ed

Browse files
chore: Update generation configuration at Wed Jun 25 02:33:57 UTC 2025 (#11644)
This pull request is generated with proto changes between [googleapis/googleapis@fc1e32c](googleapis/googleapis@fc1e32c) (exclusive) and [googleapis/googleapis@8a88323](googleapis/googleapis@8a88323) (inclusive). BEGIN_COMMIT_OVERRIDE BEGIN_NESTED_COMMIT feat: [retail] add a user_attributes field in SearchRequest that can be used for personalization feat: [retail] add a model_scores field in SearchResponse.results to expose model quality signals PiperOrigin-RevId: 775377248 Source Link: [googleapis/googleapis@d2835e8](googleapis/googleapis@d2835e8) END_NESTED_COMMIT END_COMMIT_OVERRIDE
1 parent 5987aa8 commit 0f5f4ed

File tree

27 files changed

+3327
-275
lines changed

27 files changed

+3327
-275
lines changed

generation_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
gapic_generator_version: 2.59.0
2-
googleapis_commitish: fc1e32c211bbb46c7213ffa68fe3273da16ab358
2+
googleapis_commitish: 8a883235bc76e941ef745a5b5465878dadc9c440
33
libraries_bom_version: 26.61.0
44

55
# the libraries are ordered with respect to library name, which is

java-retail/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,20 @@ If you are using Maven without the BOM, add this to your dependencies:
4242
<dependency>
4343
<groupId>com.google.cloud</groupId>
4444
<artifactId>google-cloud-retail</artifactId>
45-
<version>2.65.0</version>
45+
<version>2.68.0</version>
4646
</dependency>
4747
```
4848

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

5151
```Groovy
52-
implementation 'com.google.cloud:google-cloud-retail:2.65.0'
52+
implementation 'com.google.cloud:google-cloud-retail:2.68.0'
5353
```
5454

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

5757
```Scala
58-
libraryDependencies += "com.google.cloud" % "google-cloud-retail" % "2.65.0"
58+
libraryDependencies += "com.google.cloud" % "google-cloud-retail" % "2.68.0"
5959
```
6060

6161
## Authentication
@@ -194,7 +194,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
194194
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
195195
[stability-image]: https://img.shields.io/badge/stability-stable-green
196196
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-retail.svg
197-
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-retail/2.65.0
197+
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-retail/2.68.0
198198
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
199199
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
200200
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles

java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,16 @@
104104
* </tr>
105105
* <tr>
106106
* <td><p> SetDefaultBranch</td>
107-
* <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.
108-
* <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`.
109-
* <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.
110-
* <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.
111-
* <p> More specifically:
112-
* <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>
107+
* <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.
108+
* <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`.
109+
* <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.
110+
* <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.
111+
* <p> More specifically:
112+
* <ul>
113+
* <li> PredictionService will only return product IDs from branch {newBranch}.
114+
* <li> SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set).
115+
* <li> UserEventService will only join events with products from branch {newBranch}.
116+
* </ul></td>
113117
* <td>
114118
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
115119
* <ul>
@@ -128,7 +132,7 @@
128132
* </tr>
129133
* <tr>
130134
* <td><p> GetDefaultBranch</td>
131-
* <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>
135+
* <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>
132136
* <td>
133137
* <p>Request object method variants only take one parameter, a request object, which must be constructed before the call.</p>
134138
* <ul>
@@ -657,9 +661,12 @@ public final UnaryCallable<UpdateCatalogRequest, Catalog> updateCatalogCallable(
657661
*
658662
* <p>More specifically:
659663
*
660-
* <p>&#42; PredictionService will only return product IDs from branch {newBranch}. &#42;
661-
* SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly
662-
* set). &#42; UserEventService will only join events with products from branch {newBranch}.
664+
* <ul>
665+
* <li>PredictionService will only return product IDs from branch {newBranch}.
666+
* <li>SearchService will only return product IDs from branch {newBranch} (if branch is not
667+
* explicitly set).
668+
* <li>UserEventService will only join events with products from branch {newBranch}.
669+
* </ul>
663670
*
664671
* <p>Sample code:
665672
*
@@ -713,9 +720,12 @@ public final void setDefaultBranch(CatalogName catalog) {
713720
*
714721
* <p>More specifically:
715722
*
716-
* <p>&#42; PredictionService will only return product IDs from branch {newBranch}. &#42;
717-
* SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly
718-
* set). &#42; UserEventService will only join events with products from branch {newBranch}.
723+
* <ul>
724+
* <li>PredictionService will only return product IDs from branch {newBranch}.
725+
* <li>SearchService will only return product IDs from branch {newBranch} (if branch is not
726+
* explicitly set).
727+
* <li>UserEventService will only join events with products from branch {newBranch}.
728+
* </ul>
719729
*
720730
* <p>Sample code:
721731
*
@@ -767,9 +777,12 @@ public final void setDefaultBranch(String catalog) {
767777
*
768778
* <p>More specifically:
769779
*
770-
* <p>&#42; PredictionService will only return product IDs from branch {newBranch}. &#42;
771-
* SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly
772-
* set). &#42; UserEventService will only join events with products from branch {newBranch}.
780+
* <ul>
781+
* <li>PredictionService will only return product IDs from branch {newBranch}.
782+
* <li>SearchService will only return product IDs from branch {newBranch} (if branch is not
783+
* explicitly set).
784+
* <li>UserEventService will only join events with products from branch {newBranch}.
785+
* </ul>
773786
*
774787
* <p>Sample code:
775788
*
@@ -825,9 +838,12 @@ public final void setDefaultBranch(SetDefaultBranchRequest request) {
825838
*
826839
* <p>More specifically:
827840
*
828-
* <p>&#42; PredictionService will only return product IDs from branch {newBranch}. &#42;
829-
* SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly
830-
* set). &#42; UserEventService will only join events with products from branch {newBranch}.
841+
* <ul>
842+
* <li>PredictionService will only return product IDs from branch {newBranch}.
843+
* <li>SearchService will only return product IDs from branch {newBranch} (if branch is not
844+
* explicitly set).
845+
* <li>UserEventService will only join events with products from branch {newBranch}.
846+
* </ul>
831847
*
832848
* <p>Sample code:
833849
*

java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceClient.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
* .setLanguageCode("languageCode-2092349083")
8080
* .setRegionCode("regionCode-1991004415")
8181
* .setPlaceId("placeId-494224254")
82+
* .putAllUserAttributes(new HashMap<String, StringList>())
8283
* .build();
8384
* for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) {
8485
* // doThingsWith(element);
@@ -263,6 +264,7 @@ public SearchServiceStub getStub() {
263264
* .setLanguageCode("languageCode-2092349083")
264265
* .setRegionCode("regionCode-1991004415")
265266
* .setPlaceId("placeId-494224254")
267+
* .putAllUserAttributes(new HashMap<String, StringList>())
266268
* .build();
267269
* for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) {
268270
* // doThingsWith(element);
@@ -323,6 +325,7 @@ public final SearchPagedResponse search(SearchRequest request) {
323325
* .setLanguageCode("languageCode-2092349083")
324326
* .setRegionCode("regionCode-1991004415")
325327
* .setPlaceId("placeId-494224254")
328+
* .putAllUserAttributes(new HashMap<String, StringList>())
326329
* .build();
327330
* ApiFuture<SearchResponse.SearchResult> future =
328331
* searchServiceClient.searchPagedCallable().futureCall(request);
@@ -383,6 +386,7 @@ public final UnaryCallable<SearchRequest, SearchPagedResponse> searchPagedCallab
383386
* .setLanguageCode("languageCode-2092349083")
384387
* .setRegionCode("regionCode-1991004415")
385388
* .setPlaceId("placeId-494224254")
389+
* .putAllUserAttributes(new HashMap<String, StringList>())
386390
* .build();
387391
* while (true) {
388392
* SearchResponse response = searchServiceClient.searchCallable().call(request);

java-retail/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
* .setLanguageCode("languageCode-2092349083")
264264
* .setRegionCode("regionCode-1991004415")
265265
* .setPlaceId("placeId-494224254")
266+
* .putAllUserAttributes(new HashMap<String, StringList>())
266267
* .build();
267268
* for (SearchResponse.SearchResult element : searchServiceClient.search(request).iterateAll()) {
268269
* // doThingsWith(element);

java-retail/google-cloud-retail/src/main/resources/META-INF/native-image/com.google.cloud.retail.v2/reflect-config.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,24 @@
13761376
"allDeclaredClasses": true,
13771377
"allPublicClasses": true
13781378
},
1379+
{
1380+
"name": "com.google.cloud.retail.v2.DoubleList",
1381+
"queryAllDeclaredConstructors": true,
1382+
"queryAllPublicConstructors": true,
1383+
"queryAllDeclaredMethods": true,
1384+
"allPublicMethods": true,
1385+
"allDeclaredClasses": true,
1386+
"allPublicClasses": true
1387+
},
1388+
{
1389+
"name": "com.google.cloud.retail.v2.DoubleList$Builder",
1390+
"queryAllDeclaredConstructors": true,
1391+
"queryAllPublicConstructors": true,
1392+
"queryAllDeclaredMethods": true,
1393+
"allPublicMethods": true,
1394+
"allDeclaredClasses": true,
1395+
"allPublicClasses": true
1396+
},
13791397
{
13801398
"name": "com.google.cloud.retail.v2.ExperimentInfo",
13811399
"queryAllDeclaredConstructors": true,
@@ -3842,6 +3860,24 @@
38423860
"allDeclaredClasses": true,
38433861
"allPublicClasses": true
38443862
},
3863+
{
3864+
"name": "com.google.cloud.retail.v2.StringList",
3865+
"queryAllDeclaredConstructors": true,
3866+
"queryAllPublicConstructors": true,
3867+
"queryAllDeclaredMethods": true,
3868+
"allPublicMethods": true,
3869+
"allDeclaredClasses": true,
3870+
"allPublicClasses": true
3871+
},
3872+
{
3873+
"name": "com.google.cloud.retail.v2.StringList$Builder",
3874+
"queryAllDeclaredConstructors": true,
3875+
"queryAllPublicConstructors": true,
3876+
"queryAllDeclaredMethods": true,
3877+
"allPublicMethods": true,
3878+
"allDeclaredClasses": true,
3879+
"allPublicClasses": true
3880+
},
38453881
{
38463882
"name": "com.google.cloud.retail.v2.Tile",
38473883
"queryAllDeclaredConstructors": true,

java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/SearchServiceClientHttpJsonTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public void searchTest() throws Exception {
117117
.setLanguageCode("languageCode-2092349083")
118118
.setRegionCode("regionCode-1991004415")
119119
.setPlaceId("placeId-494224254")
120+
.putAllUserAttributes(new HashMap<String, StringList>())
120121
.build();
121122

122123
SearchPagedResponse pagedListResponse = client.search(request);
@@ -181,6 +182,7 @@ public void searchExceptionTest() throws Exception {
181182
.setLanguageCode("languageCode-2092349083")
182183
.setRegionCode("regionCode-1991004415")
183184
.setPlaceId("placeId-494224254")
185+
.putAllUserAttributes(new HashMap<String, StringList>())
184186
.build();
185187
client.search(request);
186188
Assert.fail("No exception raised");

java-retail/google-cloud-retail/src/test/java/com/google/cloud/retail/v2/SearchServiceClientTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ public void searchTest() throws Exception {
122122
.setLanguageCode("languageCode-2092349083")
123123
.setRegionCode("regionCode-1991004415")
124124
.setPlaceId("placeId-494224254")
125+
.putAllUserAttributes(new HashMap<String, StringList>())
125126
.build();
126127

127128
SearchPagedResponse pagedListResponse = client.search(request);
@@ -165,6 +166,7 @@ public void searchTest() throws Exception {
165166
Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode());
166167
Assert.assertEquals(request.getRegionCode(), actualRequest.getRegionCode());
167168
Assert.assertEquals(request.getPlaceId(), actualRequest.getPlaceId());
169+
Assert.assertEquals(request.getUserAttributesMap(), actualRequest.getUserAttributesMap());
168170
Assert.assertTrue(
169171
channelProvider.isHeaderSent(
170172
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -207,6 +209,7 @@ public void searchExceptionTest() throws Exception {
207209
.setLanguageCode("languageCode-2092349083")
208210
.setRegionCode("regionCode-1991004415")
209211
.setPlaceId("placeId-494224254")
212+
.putAllUserAttributes(new HashMap<String, StringList>())
210213
.build();
211214
client.search(request);
212215
Assert.fail("No exception raised");

0 commit comments

Comments
 (0)