This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]");
+ * ProductReview response = productReviewsServiceClient.getProductReview(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the ProductReviewsServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *
| Method | + *Description | + *Method Variants | + *
|---|---|---|
GetProductReview |
+ * Gets a product review. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListProductReviews |
+ * Lists product reviews. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
InsertProductReview |
+ * Inserts a product review. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteProductReview |
+ * Deletes a product review. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of ProductReviewsServiceSettings + * to create(). For example: + * + *
To customize credentials: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductReviewsServiceSettings productReviewsServiceSettings =
+ * ProductReviewsServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create(productReviewsServiceSettings);
+ * }
+ *
+ * To customize the endpoint: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductReviewsServiceSettings productReviewsServiceSettings =
+ * ProductReviewsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create(productReviewsServiceSettings);
+ * }
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductReviewsServiceSettings productReviewsServiceSettings =
+ * ProductReviewsServiceSettings.newHttpJsonBuilder().build();
+ * ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create(productReviewsServiceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class ProductReviewsServiceClient implements BackgroundResource { + private final @Nullable ProductReviewsServiceSettings settings; + private final ProductReviewsServiceStub stub; + + /** Constructs an instance of ProductReviewsServiceClient with default settings. */ + public static final ProductReviewsServiceClient create() throws IOException { + return create(ProductReviewsServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ProductReviewsServiceClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ProductReviewsServiceClient create(ProductReviewsServiceSettings settings) + throws IOException { + return new ProductReviewsServiceClient(settings); + } + + /** + * Constructs an instance of ProductReviewsServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(ProductReviewsServiceSettings). + */ + public static final ProductReviewsServiceClient create(ProductReviewsServiceStub stub) { + return new ProductReviewsServiceClient(stub); + } + + /** + * Constructs an instance of ProductReviewsServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected ProductReviewsServiceClient(ProductReviewsServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ProductReviewsServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected ProductReviewsServiceClient(ProductReviewsServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final @Nullable ProductReviewsServiceSettings getSettings() { + return settings; + } + + public ProductReviewsServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a product review. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]");
+ * ProductReview response = productReviewsServiceClient.getProductReview(name);
+ * }
+ * }
+ *
+ * @param name Required. The ID of the merchant review. Format:
+ * accounts/{account}/productReviews/{productReview}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ProductReview getProductReview(@Nullable ProductReviewName name) {
+ GetProductReviewRequest request =
+ GetProductReviewRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getProductReview(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a product review.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * String name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]").toString();
+ * ProductReview response = productReviewsServiceClient.getProductReview(name);
+ * }
+ * }
+ *
+ * @param name Required. The ID of the merchant review. Format:
+ * accounts/{account}/productReviews/{productReview}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ProductReview getProductReview(String name) {
+ GetProductReviewRequest request = GetProductReviewRequest.newBuilder().setName(name).build();
+ return getProductReview(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a product review.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * GetProductReviewRequest request =
+ * GetProductReviewRequest.newBuilder()
+ * .setName(ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]").toString())
+ * .build();
+ * ProductReview response = productReviewsServiceClient.getProductReview(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ProductReview getProductReview(GetProductReviewRequest request) {
+ return getProductReviewCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a product review.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * GetProductReviewRequest request =
+ * GetProductReviewRequest.newBuilder()
+ * .setName(ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]").toString())
+ * .build();
+ * ApiFuture future =
+ * productReviewsServiceClient.getProductReviewCallable().futureCall(request);
+ * // Do something.
+ * ProductReview response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * AccountName parent = AccountName.of("[ACCOUNT]");
+ * for (ProductReview element :
+ * productReviewsServiceClient.listProductReviews(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The account to list product reviews for. Format: accounts/{account}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProductReviewsPagedResponse listProductReviews(@Nullable AccountName parent) {
+ ListProductReviewsRequest request =
+ ListProductReviewsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listProductReviews(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists product reviews.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * String parent = AccountName.of("[ACCOUNT]").toString();
+ * for (ProductReview element :
+ * productReviewsServiceClient.listProductReviews(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The account to list product reviews for. Format: accounts/{account}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProductReviewsPagedResponse listProductReviews(String parent) {
+ ListProductReviewsRequest request =
+ ListProductReviewsRequest.newBuilder().setParent(parent).build();
+ return listProductReviews(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists product reviews.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * ListProductReviewsRequest request =
+ * ListProductReviewsRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (ProductReview element :
+ * productReviewsServiceClient.listProductReviews(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListProductReviewsPagedResponse listProductReviews(
+ ListProductReviewsRequest request) {
+ return listProductReviewsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists product reviews.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * ListProductReviewsRequest request =
+ * ListProductReviewsRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * productReviewsServiceClient.listProductReviewsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (ProductReview element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * ListProductReviewsRequest request =
+ * ListProductReviewsRequest.newBuilder()
+ * .setParent(AccountName.of("[ACCOUNT]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListProductReviewsResponse response =
+ * productReviewsServiceClient.listProductReviewsCallable().call(request);
+ * for (ProductReview element : response.getProductReviewsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * InsertProductReviewRequest request =
+ * InsertProductReviewRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setProductReview(ProductReview.newBuilder().build())
+ * .setDataSource("dataSource1272470629")
+ * .build();
+ * ProductReview response = productReviewsServiceClient.insertProductReview(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ProductReview insertProductReview(InsertProductReviewRequest request) {
+ return insertProductReviewCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Inserts a product review.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * InsertProductReviewRequest request =
+ * InsertProductReviewRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setProductReview(ProductReview.newBuilder().build())
+ * .setDataSource("dataSource1272470629")
+ * .build();
+ * ApiFuture future =
+ * productReviewsServiceClient.insertProductReviewCallable().futureCall(request);
+ * // Do something.
+ * ProductReview response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]");
+ * productReviewsServiceClient.deleteProductReview(name);
+ * }
+ * }
+ *
+ * @param name Required. The ID of the Product review. Format:
+ * accounts/{account}/productReviews/{productReview}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteProductReview(@Nullable ProductReviewName name) {
+ DeleteProductReviewRequest request =
+ DeleteProductReviewRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteProductReview(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a product review.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * String name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]").toString();
+ * productReviewsServiceClient.deleteProductReview(name);
+ * }
+ * }
+ *
+ * @param name Required. The ID of the Product review. Format:
+ * accounts/{account}/productReviews/{productReview}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteProductReview(String name) {
+ DeleteProductReviewRequest request =
+ DeleteProductReviewRequest.newBuilder().setName(name).build();
+ deleteProductReview(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a product review.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * DeleteProductReviewRequest request =
+ * DeleteProductReviewRequest.newBuilder()
+ * .setName(ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]").toString())
+ * .build();
+ * productReviewsServiceClient.deleteProductReview(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteProductReview(DeleteProductReviewRequest request) {
+ deleteProductReviewCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a product review.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * DeleteProductReviewRequest request =
+ * DeleteProductReviewRequest.newBuilder()
+ * .setName(ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]").toString())
+ * .build();
+ * ApiFuture future =
+ * productReviewsServiceClient.deleteProductReviewCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
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. + * + *
For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getProductReview: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductReviewsServiceSettings.Builder productReviewsServiceSettingsBuilder =
+ * ProductReviewsServiceSettings.newBuilder();
+ * productReviewsServiceSettingsBuilder
+ * .getProductReviewSettings()
+ * .setRetrySettings(
+ * productReviewsServiceSettingsBuilder
+ * .getProductReviewSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * ProductReviewsServiceSettings productReviewsServiceSettings =
+ * productReviewsServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class ProductReviewsServiceSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= ProductReviewsServiceClient =======================
+ *
+ * Service Description: Service to manage product reviews.
+ *
+ * Sample for ProductReviewsServiceClient:
+ *
+ * This class is for advanced usage.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class GrpcProductReviewsServiceCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class GrpcProductReviewsServiceStub extends ProductReviewsServiceStub {
+ private static final MethodDescriptor This class is for advanced usage.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HttpJsonProductReviewsServiceCallableFactory
+ implements HttpJsonStubCallableFactory This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public class HttpJsonProductReviewsServiceStub extends ProductReviewsServiceStub {
+ private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build();
+
+ private static final ApiMethodDescriptor This class is for advanced usage and reflects the underlying API directly.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+public abstract class ProductReviewsServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * 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.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getProductReview:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ProductReviewsServiceClient productReviewsServiceClient =
+ * ProductReviewsServiceClient.create()) {
+ * ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]");
+ * ProductReview response = productReviewsServiceClient.getProductReview(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.shopping.merchant.reviews.v1;
+
+import javax.annotation.Generated;
diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/GrpcProductReviewsServiceCallableFactory.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/GrpcProductReviewsServiceCallableFactory.java
new file mode 100644
index 000000000000..336f7af87d89
--- /dev/null
+++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/GrpcProductReviewsServiceCallableFactory.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2026 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.shopping.merchant.reviews.v1.stub;
+
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+import org.jspecify.annotations.NullMarked;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the ProductReviewsService service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ProductReviewsServiceStubSettings.Builder productReviewsServiceSettingsBuilder =
+ * ProductReviewsServiceStubSettings.newBuilder();
+ * productReviewsServiceSettingsBuilder
+ * .getProductReviewSettings()
+ * .setRetrySettings(
+ * productReviewsServiceSettingsBuilder
+ * .getProductReviewSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * ProductReviewsServiceStubSettings productReviewsServiceSettings =
+ * productReviewsServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
+ * retries.
+ */
+@NullMarked
+@Generated("by gapic-generator-java")
+@SuppressWarnings("CanonicalDuration")
+public class ProductReviewsServiceStubSettings
+ extends StubSettings