Skip to content

Commit 13310c7

Browse files
authored
feat(google/shopping/merchant/reviews/v1): add shopping-merchant-reviews (#14724)
Onboard google/shopping/merchant/reviews/v1 API (shopping-merchant-reviews). Internal tracking bug http://b/574418635 PiperOrigin-RevId: 1000790478 ## Debug Info ### System Details - JDK version: javac 17.0.18 - Maven version: Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937) - OS: Linux 7.1.6-1rodete1-amd64 x86_64 - Librarian version: v0.49.0 ### Commands Executed - `MAVEN_SKIP_RC=true go run github.com/googleapis/librarian/cmd/librarian@v0.49.0 install` - `go run github.com/googleapis/librarian/cmd/librarian@v0.49.0 add google/shopping/merchant/reviews/v1` - `go run github.com/googleapis/librarian/cmd/librarian@v0.49.0 generate shopping-merchant-reviews` - `mvn -B -ntp compile -pl :google-shopping-merchant-reviews -am` - `go run github.com/googleapis/librarian/cmd/librarian@v0.49.0 tidy` - `git add .` - `git commit -m "feat(google/shopping/merchant/reviews/v1): add shopping-merchant-reviews"`
1 parent 09ce4c5 commit 13310c7

67 files changed

Lines changed: 32267 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎java-shopping-merchant-reviews/google-shopping-merchant-reviews-bom/pom.xml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,21 @@
2929
<artifactId>google-shopping-merchant-reviews</artifactId>
3030
<version>0.46.0-SNAPSHOT</version><!-- {x-version-update:google-shopping-merchant-reviews:current} -->
3131
</dependency>
32+
<dependency>
33+
<groupId>com.google.shopping.api.grpc</groupId>
34+
<artifactId>grpc-google-shopping-merchant-reviews-v1</artifactId>
35+
<version>0.46.0-SNAPSHOT</version><!-- {x-version-update:grpc-google-shopping-merchant-reviews-v1:current} -->
36+
</dependency>
3237
<dependency>
3338
<groupId>com.google.shopping.api.grpc</groupId>
3439
<artifactId>grpc-google-shopping-merchant-reviews-v1beta</artifactId>
3540
<version>0.46.0-SNAPSHOT</version><!-- {x-version-update:grpc-google-shopping-merchant-reviews-v1beta:current} -->
3641
</dependency>
42+
<dependency>
43+
<groupId>com.google.shopping.api.grpc</groupId>
44+
<artifactId>proto-google-shopping-merchant-reviews-v1</artifactId>
45+
<version>0.46.0-SNAPSHOT</version><!-- {x-version-update:proto-google-shopping-merchant-reviews-v1:current} -->
46+
</dependency>
3747
<dependency>
3848
<groupId>com.google.shopping.api.grpc</groupId>
3949
<artifactId>proto-google-shopping-merchant-reviews-v1beta</artifactId>

‎java-shopping-merchant-reviews/google-shopping-merchant-reviews/pom.xml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
</dependency>
4343

4444
<!-- {x-generated-proto-dependencies-start} -->
45+
<dependency>
46+
<groupId>com.google.shopping.api.grpc</groupId>
47+
<artifactId>proto-google-shopping-merchant-reviews-v1</artifactId>
48+
</dependency>
4549
<dependency>
4650
<groupId>com.google.shopping.api.grpc</groupId>
4751
<artifactId>proto-google-shopping-merchant-reviews-v1beta</artifactId>
@@ -90,6 +94,11 @@
9094
</dependency>
9195

9296
<!-- {x-generated-grpc-dependencies-start} -->
97+
<dependency>
98+
<groupId>com.google.shopping.api.grpc</groupId>
99+
<artifactId>grpc-google-shopping-merchant-reviews-v1</artifactId>
100+
<scope>test</scope>
101+
</dependency>
93102
<dependency>
94103
<groupId>com.google.shopping.api.grpc</groupId>
95104
<artifactId>grpc-google-shopping-merchant-reviews-v1beta</artifactId>

‎java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceClient.java‎

Lines changed: 832 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
1+
/*
2+
* Copyright 2026 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.shopping.merchant.reviews.v1;
18+
19+
import static com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient.ListProductReviewsPagedResponse;
20+
21+
import com.google.api.core.ApiFunction;
22+
import com.google.api.core.BetaApi;
23+
import com.google.api.gax.core.GoogleCredentialsProvider;
24+
import com.google.api.gax.core.InstantiatingExecutorProvider;
25+
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
26+
import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
27+
import com.google.api.gax.rpc.ApiClientHeaderProvider;
28+
import com.google.api.gax.rpc.ClientContext;
29+
import com.google.api.gax.rpc.ClientSettings;
30+
import com.google.api.gax.rpc.PagedCallSettings;
31+
import com.google.api.gax.rpc.TransportChannelProvider;
32+
import com.google.api.gax.rpc.UnaryCallSettings;
33+
import com.google.protobuf.Empty;
34+
import com.google.shopping.merchant.reviews.v1.stub.ProductReviewsServiceStubSettings;
35+
import java.io.IOException;
36+
import java.util.List;
37+
import javax.annotation.Generated;
38+
import org.jspecify.annotations.NullMarked;
39+
import org.jspecify.annotations.Nullable;
40+
41+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
42+
/**
43+
* Settings class to configure an instance of {@link ProductReviewsServiceClient}.
44+
*
45+
* <p>The default instance has everything set to sensible defaults:
46+
*
47+
* <ul>
48+
* <li>The default service address (merchantapi.googleapis.com) and default port (443) are used.
49+
* <li>Credentials are acquired automatically through Application Default Credentials.
50+
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
51+
* </ul>
52+
*
53+
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
54+
* build() is called, the tree of builders is called to create the complete settings object.
55+
*
56+
* <p>For example, to set the
57+
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
58+
* of getProductReview:
59+
*
60+
* <pre>{@code
61+
* // This snippet has been automatically generated and should be regarded as a code template only.
62+
* // It will require modifications to work:
63+
* // - It may require correct/in-range values for request initialization.
64+
* // - It may require specifying regional endpoints when creating the service client as shown in
65+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
66+
* ProductReviewsServiceSettings.Builder productReviewsServiceSettingsBuilder =
67+
* ProductReviewsServiceSettings.newBuilder();
68+
* productReviewsServiceSettingsBuilder
69+
* .getProductReviewSettings()
70+
* .setRetrySettings(
71+
* productReviewsServiceSettingsBuilder
72+
* .getProductReviewSettings()
73+
* .getRetrySettings()
74+
* .toBuilder()
75+
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
76+
* .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
77+
* .setMaxAttempts(5)
78+
* .setMaxRetryDelayDuration(Duration.ofSeconds(30))
79+
* .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
80+
* .setRetryDelayMultiplier(1.3)
81+
* .setRpcTimeoutMultiplier(1.5)
82+
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
83+
* .build());
84+
* ProductReviewsServiceSettings productReviewsServiceSettings =
85+
* productReviewsServiceSettingsBuilder.build();
86+
* }</pre>
87+
*
88+
* Please refer to the [Client Side Retry
89+
* Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
90+
* retries.
91+
*/
92+
@NullMarked
93+
@Generated("by gapic-generator-java")
94+
public class ProductReviewsServiceSettings extends ClientSettings<ProductReviewsServiceSettings> {
95+
96+
/** Returns the object with the settings used for calls to getProductReview. */
97+
public UnaryCallSettings<GetProductReviewRequest, ProductReview> getProductReviewSettings() {
98+
return ((ProductReviewsServiceStubSettings) getStubSettings()).getProductReviewSettings();
99+
}
100+
101+
/** Returns the object with the settings used for calls to listProductReviews. */
102+
public PagedCallSettings<
103+
ListProductReviewsRequest, ListProductReviewsResponse, ListProductReviewsPagedResponse>
104+
listProductReviewsSettings() {
105+
return ((ProductReviewsServiceStubSettings) getStubSettings()).listProductReviewsSettings();
106+
}
107+
108+
/** Returns the object with the settings used for calls to insertProductReview. */
109+
public UnaryCallSettings<InsertProductReviewRequest, ProductReview>
110+
insertProductReviewSettings() {
111+
return ((ProductReviewsServiceStubSettings) getStubSettings()).insertProductReviewSettings();
112+
}
113+
114+
/** Returns the object with the settings used for calls to deleteProductReview. */
115+
public UnaryCallSettings<DeleteProductReviewRequest, Empty> deleteProductReviewSettings() {
116+
return ((ProductReviewsServiceStubSettings) getStubSettings()).deleteProductReviewSettings();
117+
}
118+
119+
public static final ProductReviewsServiceSettings create(ProductReviewsServiceStubSettings stub)
120+
throws IOException {
121+
return new ProductReviewsServiceSettings.Builder(stub.toBuilder()).build();
122+
}
123+
124+
/** Returns a builder for the default ExecutorProvider for this service. */
125+
public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() {
126+
return ProductReviewsServiceStubSettings.defaultExecutorProviderBuilder();
127+
}
128+
129+
/** Returns the default service endpoint. */
130+
public static String getDefaultEndpoint() {
131+
return ProductReviewsServiceStubSettings.getDefaultEndpoint();
132+
}
133+
134+
/** Returns the default service scopes. */
135+
public static List<String> getDefaultServiceScopes() {
136+
return ProductReviewsServiceStubSettings.getDefaultServiceScopes();
137+
}
138+
139+
/** Returns a builder for the default credentials for this service. */
140+
public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {
141+
return ProductReviewsServiceStubSettings.defaultCredentialsProviderBuilder();
142+
}
143+
144+
/** Returns a builder for the default gRPC ChannelProvider for this service. */
145+
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
146+
return ProductReviewsServiceStubSettings.defaultGrpcTransportProviderBuilder();
147+
}
148+
149+
/** Returns a builder for the default REST ChannelProvider for this service. */
150+
@BetaApi
151+
public static InstantiatingHttpJsonChannelProvider.Builder
152+
defaultHttpJsonTransportProviderBuilder() {
153+
return ProductReviewsServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
154+
}
155+
156+
public static TransportChannelProvider defaultTransportChannelProvider() {
157+
return ProductReviewsServiceStubSettings.defaultTransportChannelProvider();
158+
}
159+
160+
public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
161+
return ProductReviewsServiceStubSettings.defaultApiClientHeaderProviderBuilder();
162+
}
163+
164+
/** Returns a new gRPC builder for this class. */
165+
public static Builder newBuilder() {
166+
return Builder.createDefault();
167+
}
168+
169+
/** Returns a new REST builder for this class. */
170+
public static Builder newHttpJsonBuilder() {
171+
return Builder.createHttpJsonDefault();
172+
}
173+
174+
/** Returns a new builder for this class. */
175+
public static Builder newBuilder(@Nullable ClientContext clientContext) {
176+
return new Builder(clientContext);
177+
}
178+
179+
/** Returns a builder containing all the values of this settings class. */
180+
public Builder toBuilder() {
181+
return new Builder(this);
182+
}
183+
184+
protected ProductReviewsServiceSettings(Builder settingsBuilder) throws IOException {
185+
super(settingsBuilder);
186+
}
187+
188+
/** Builder for ProductReviewsServiceSettings. */
189+
public static class Builder
190+
extends ClientSettings.Builder<ProductReviewsServiceSettings, Builder> {
191+
192+
protected Builder() throws IOException {
193+
this(((ClientContext) null));
194+
}
195+
196+
protected Builder(@Nullable ClientContext clientContext) {
197+
super(ProductReviewsServiceStubSettings.newBuilder(clientContext));
198+
}
199+
200+
protected Builder(ProductReviewsServiceSettings settings) {
201+
super(settings.getStubSettings().toBuilder());
202+
}
203+
204+
protected Builder(ProductReviewsServiceStubSettings.Builder stubSettings) {
205+
super(stubSettings);
206+
}
207+
208+
private static Builder createDefault() {
209+
return new Builder(ProductReviewsServiceStubSettings.newBuilder());
210+
}
211+
212+
private static Builder createHttpJsonDefault() {
213+
return new Builder(ProductReviewsServiceStubSettings.newHttpJsonBuilder());
214+
}
215+
216+
public ProductReviewsServiceStubSettings.Builder getStubSettingsBuilder() {
217+
return ((ProductReviewsServiceStubSettings.Builder) getStubSettings());
218+
}
219+
220+
/**
221+
* Applies the given settings updater function to all of the unary API methods in this service.
222+
*
223+
* <p>Note: This method does not support applying settings to streaming methods.
224+
*/
225+
public Builder applyToAllUnaryMethods(
226+
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
227+
super.applyToAllUnaryMethods(
228+
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
229+
return this;
230+
}
231+
232+
/** Returns the builder for the settings used for calls to getProductReview. */
233+
public UnaryCallSettings.Builder<GetProductReviewRequest, ProductReview>
234+
getProductReviewSettings() {
235+
return getStubSettingsBuilder().getProductReviewSettings();
236+
}
237+
238+
/** Returns the builder for the settings used for calls to listProductReviews. */
239+
public PagedCallSettings.Builder<
240+
ListProductReviewsRequest, ListProductReviewsResponse, ListProductReviewsPagedResponse>
241+
listProductReviewsSettings() {
242+
return getStubSettingsBuilder().listProductReviewsSettings();
243+
}
244+
245+
/** Returns the builder for the settings used for calls to insertProductReview. */
246+
public UnaryCallSettings.Builder<InsertProductReviewRequest, ProductReview>
247+
insertProductReviewSettings() {
248+
return getStubSettingsBuilder().insertProductReviewSettings();
249+
}
250+
251+
/** Returns the builder for the settings used for calls to deleteProductReview. */
252+
public UnaryCallSettings.Builder<DeleteProductReviewRequest, Empty>
253+
deleteProductReviewSettings() {
254+
return getStubSettingsBuilder().deleteProductReviewSettings();
255+
}
256+
257+
@Override
258+
public ProductReviewsServiceSettings build() throws IOException {
259+
return new ProductReviewsServiceSettings(this);
260+
}
261+
}
262+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"schema": "1.0",
3+
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
4+
"language": "java",
5+
"protoPackage": "google.shopping.merchant.reviews.v1",
6+
"libraryPackage": "com.google.shopping.merchant.reviews.v1",
7+
"services": {
8+
"ProductReviewsService": {
9+
"clients": {
10+
"grpc": {
11+
"libraryClient": "ProductReviewsServiceClient",
12+
"rpcs": {
13+
"DeleteProductReview": {
14+
"methods": ["deleteProductReview", "deleteProductReview", "deleteProductReview", "deleteProductReviewCallable"]
15+
},
16+
"GetProductReview": {
17+
"methods": ["getProductReview", "getProductReview", "getProductReview", "getProductReviewCallable"]
18+
},
19+
"InsertProductReview": {
20+
"methods": ["insertProductReview", "insertProductReviewCallable"]
21+
},
22+
"ListProductReviews": {
23+
"methods": ["listProductReviews", "listProductReviews", "listProductReviews", "listProductReviewsPagedCallable", "listProductReviewsCallable"]
24+
}
25+
}
26+
}
27+
}
28+
}
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright 2026 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* A client to Merchant API
19+
*
20+
* <p>The interfaces provided are listed below, along with usage samples.
21+
*
22+
* <p>======================= ProductReviewsServiceClient =======================
23+
*
24+
* <p>Service Description: Service to manage product reviews.
25+
*
26+
* <p>Sample for ProductReviewsServiceClient:
27+
*
28+
* <pre>{@code
29+
* // This snippet has been automatically generated and should be regarded as a code template only.
30+
* // It will require modifications to work:
31+
* // - It may require correct/in-range values for request initialization.
32+
* // - It may require specifying regional endpoints when creating the service client as shown in
33+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
34+
* try (ProductReviewsServiceClient productReviewsServiceClient =
35+
* ProductReviewsServiceClient.create()) {
36+
* ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]");
37+
* ProductReview response = productReviewsServiceClient.getProductReview(name);
38+
* }
39+
* }</pre>
40+
*/
41+
@Generated("by gapic-generator-java")
42+
package com.google.shopping.merchant.reviews.v1;
43+
44+
import javax.annotation.Generated;

0 commit comments

Comments
 (0)