diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews-bom/pom.xml b/java-shopping-merchant-reviews/google-shopping-merchant-reviews-bom/pom.xml index 84bb0adaeada..2414f5b1dc7b 100644 --- a/java-shopping-merchant-reviews/google-shopping-merchant-reviews-bom/pom.xml +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews-bom/pom.xml @@ -29,11 +29,21 @@ google-shopping-merchant-reviews 0.46.0-SNAPSHOT + + com.google.shopping.api.grpc + grpc-google-shopping-merchant-reviews-v1 + 0.46.0-SNAPSHOT + com.google.shopping.api.grpc grpc-google-shopping-merchant-reviews-v1beta 0.46.0-SNAPSHOT + + com.google.shopping.api.grpc + proto-google-shopping-merchant-reviews-v1 + 0.46.0-SNAPSHOT + com.google.shopping.api.grpc proto-google-shopping-merchant-reviews-v1beta diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/pom.xml b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/pom.xml index 9a0a3bb1f2d5..e27948176de3 100644 --- a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/pom.xml +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/pom.xml @@ -42,6 +42,10 @@ + + com.google.shopping.api.grpc + proto-google-shopping-merchant-reviews-v1 + com.google.shopping.api.grpc proto-google-shopping-merchant-reviews-v1beta @@ -90,6 +94,11 @@ + + com.google.shopping.api.grpc + grpc-google-shopping-merchant-reviews-v1 + test + com.google.shopping.api.grpc grpc-google-shopping-merchant-reviews-v1beta diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceClient.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceClient.java new file mode 100644 index 000000000000..331688b7b4e0 --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceClient.java @@ -0,0 +1,832 @@ +/* + * 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; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.shopping.merchant.reviews.v1.stub.ProductReviewsServiceStub; +import com.google.shopping.merchant.reviews.v1.stub.ProductReviewsServiceStubSettings; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Service to manage product reviews. + * + *

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(). + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

GetProductReview

Gets a product review.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • getProductReview(GetProductReviewRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • getProductReview(ProductReviewName name) + *

  • getProductReview(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • getProductReviewCallable() + *

+ *

ListProductReviews

Lists product reviews.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listProductReviews(ListProductReviewsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listProductReviews(AccountName parent) + *

  • listProductReviews(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listProductReviewsPagedCallable() + *

  • listProductReviewsCallable() + *

+ *

InsertProductReview

Inserts a product review.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • insertProductReview(InsertProductReviewRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • insertProductReviewCallable() + *

+ *

DeleteProductReview

Deletes a product review.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • deleteProductReview(DeleteProductReviewRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • deleteProductReview(ProductReviewName name) + *

  • deleteProductReview(String name) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • deleteProductReviewCallable() + *

+ *
+ * + *

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 UnaryCallable getProductReviewCallable() { + return stub.getProductReviewCallable(); + } + + // 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()) {
+   *   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 UnaryCallable + listProductReviewsPagedCallable() { + return stub.listProductReviewsPagedCallable(); + } + + // 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();
+   *   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 UnaryCallable + listProductReviewsCallable() { + return stub.listProductReviewsCallable(); + } + + // 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();
+   *   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 UnaryCallable + insertProductReviewCallable() { + return stub.insertProductReviewCallable(); + } + + // 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()) {
+   *   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 UnaryCallable deleteProductReviewCallable() { + return stub.deleteProductReviewCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListProductReviewsPagedResponse + extends AbstractPagedListResponse< + ListProductReviewsRequest, + ListProductReviewsResponse, + ProductReview, + ListProductReviewsPage, + ListProductReviewsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductReviewsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListProductReviewsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListProductReviewsPagedResponse(ListProductReviewsPage page) { + super(page, ListProductReviewsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductReviewsPage + extends AbstractPage< + ListProductReviewsRequest, + ListProductReviewsResponse, + ProductReview, + ListProductReviewsPage> { + + private ListProductReviewsPage( + @Nullable PageContext + context, + @Nullable ListProductReviewsResponse response) { + super(context, response); + } + + private static ListProductReviewsPage createEmptyPage() { + return new ListProductReviewsPage(null, null); + } + + @Override + protected ListProductReviewsPage createPage( + @Nullable PageContext + context, + @Nullable ListProductReviewsResponse response) { + return new ListProductReviewsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + @Nullable PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductReviewsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductReviewsRequest, + ListProductReviewsResponse, + ProductReview, + ListProductReviewsPage, + ListProductReviewsFixedSizeCollection> { + + private ListProductReviewsFixedSizeCollection( + @Nullable List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductReviewsFixedSizeCollection createEmptyCollection() { + return new ListProductReviewsFixedSizeCollection(null, 0); + } + + @Override + protected ListProductReviewsFixedSizeCollection createCollection( + @Nullable List pages, int collectionSize) { + return new ListProductReviewsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceSettings.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceSettings.java new file mode 100644 index 000000000000..908279e0d8ab --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceSettings.java @@ -0,0 +1,262 @@ +/* + * 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; + +import static com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient.ListProductReviewsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.protobuf.Empty; +import com.google.shopping.merchant.reviews.v1.stub.ProductReviewsServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ProductReviewsServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (merchantapi.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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 ClientSettings { + + /** Returns the object with the settings used for calls to getProductReview. */ + public UnaryCallSettings getProductReviewSettings() { + return ((ProductReviewsServiceStubSettings) getStubSettings()).getProductReviewSettings(); + } + + /** Returns the object with the settings used for calls to listProductReviews. */ + public PagedCallSettings< + ListProductReviewsRequest, ListProductReviewsResponse, ListProductReviewsPagedResponse> + listProductReviewsSettings() { + return ((ProductReviewsServiceStubSettings) getStubSettings()).listProductReviewsSettings(); + } + + /** Returns the object with the settings used for calls to insertProductReview. */ + public UnaryCallSettings + insertProductReviewSettings() { + return ((ProductReviewsServiceStubSettings) getStubSettings()).insertProductReviewSettings(); + } + + /** Returns the object with the settings used for calls to deleteProductReview. */ + public UnaryCallSettings deleteProductReviewSettings() { + return ((ProductReviewsServiceStubSettings) getStubSettings()).deleteProductReviewSettings(); + } + + public static final ProductReviewsServiceSettings create(ProductReviewsServiceStubSettings stub) + throws IOException { + return new ProductReviewsServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ProductReviewsServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ProductReviewsServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ProductReviewsServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ProductReviewsServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ProductReviewsServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ProductReviewsServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ProductReviewsServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ProductReviewsServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(@Nullable ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ProductReviewsServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ProductReviewsServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(ProductReviewsServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(ProductReviewsServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ProductReviewsServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ProductReviewsServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(ProductReviewsServiceStubSettings.newHttpJsonBuilder()); + } + + public ProductReviewsServiceStubSettings.Builder getStubSettingsBuilder() { + return ((ProductReviewsServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getProductReview. */ + public UnaryCallSettings.Builder + getProductReviewSettings() { + return getStubSettingsBuilder().getProductReviewSettings(); + } + + /** Returns the builder for the settings used for calls to listProductReviews. */ + public PagedCallSettings.Builder< + ListProductReviewsRequest, ListProductReviewsResponse, ListProductReviewsPagedResponse> + listProductReviewsSettings() { + return getStubSettingsBuilder().listProductReviewsSettings(); + } + + /** Returns the builder for the settings used for calls to insertProductReview. */ + public UnaryCallSettings.Builder + insertProductReviewSettings() { + return getStubSettingsBuilder().insertProductReviewSettings(); + } + + /** Returns the builder for the settings used for calls to deleteProductReview. */ + public UnaryCallSettings.Builder + deleteProductReviewSettings() { + return getStubSettingsBuilder().deleteProductReviewSettings(); + } + + @Override + public ProductReviewsServiceSettings build() throws IOException { + return new ProductReviewsServiceSettings(this); + } + } +} diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/gapic_metadata.json b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/gapic_metadata.json new file mode 100644 index 000000000000..46bc9cba051c --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/gapic_metadata.json @@ -0,0 +1,30 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.shopping.merchant.reviews.v1", + "libraryPackage": "com.google.shopping.merchant.reviews.v1", + "services": { + "ProductReviewsService": { + "clients": { + "grpc": { + "libraryClient": "ProductReviewsServiceClient", + "rpcs": { + "DeleteProductReview": { + "methods": ["deleteProductReview", "deleteProductReview", "deleteProductReview", "deleteProductReviewCallable"] + }, + "GetProductReview": { + "methods": ["getProductReview", "getProductReview", "getProductReview", "getProductReviewCallable"] + }, + "InsertProductReview": { + "methods": ["insertProductReview", "insertProductReviewCallable"] + }, + "ListProductReviews": { + "methods": ["listProductReviews", "listProductReviews", "listProductReviews", "listProductReviewsPagedCallable", "listProductReviewsCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/package-info.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/package-info.java new file mode 100644 index 000000000000..876a75467b75 --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/package-info.java @@ -0,0 +1,44 @@ +/* + * 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. + */ + +/** + * A client to Merchant API + * + *

The interfaces provided are listed below, along with usage samples. + * + *

======================= ProductReviewsServiceClient ======================= + * + *

Service Description: Service to manage product reviews. + * + *

Sample for ProductReviewsServiceClient: + * + *

{@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. + * + *

This class is for advanced usage. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class GrpcProductReviewsServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/GrpcProductReviewsServiceStub.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/GrpcProductReviewsServiceStub.java new file mode 100644 index 000000000000..f00fbcbfa892 --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/GrpcProductReviewsServiceStub.java @@ -0,0 +1,294 @@ +/* + * 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 static com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient.ListProductReviewsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.GetProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest; +import com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ProductReviewsService service API. + * + *

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 + getProductReviewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.shopping.merchant.reviews.v1.ProductReviewsService/GetProductReview") + .setRequestMarshaller( + ProtoUtils.marshaller(GetProductReviewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProductReview.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + listProductReviewsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.shopping.merchant.reviews.v1.ProductReviewsService/ListProductReviews") + .setRequestMarshaller( + ProtoUtils.marshaller(ListProductReviewsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductReviewsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + insertProductReviewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.shopping.merchant.reviews.v1.ProductReviewsService/InsertProductReview") + .setRequestMarshaller( + ProtoUtils.marshaller(InsertProductReviewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ProductReview.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private static final MethodDescriptor + deleteProductReviewMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.shopping.merchant.reviews.v1.ProductReviewsService/DeleteProductReview") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteProductReviewRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable getProductReviewCallable; + private final UnaryCallable + listProductReviewsCallable; + private final UnaryCallable + listProductReviewsPagedCallable; + private final UnaryCallable + insertProductReviewCallable; + private final UnaryCallable deleteProductReviewCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcProductReviewsServiceStub create( + ProductReviewsServiceStubSettings settings) throws IOException { + return new GrpcProductReviewsServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcProductReviewsServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcProductReviewsServiceStub( + ProductReviewsServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcProductReviewsServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcProductReviewsServiceStub( + ProductReviewsServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcProductReviewsServiceStub, 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 GrpcProductReviewsServiceStub( + ProductReviewsServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcProductReviewsServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcProductReviewsServiceStub, 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 GrpcProductReviewsServiceStub( + ProductReviewsServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getProductReviewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProductReviewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + GrpcCallSettings + listProductReviewsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProductReviewsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + GrpcCallSettings + insertProductReviewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(insertProductReviewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteProductReviewTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteProductReviewMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.getProductReviewCallable = + callableFactory.createUnaryCallable( + getProductReviewTransportSettings, settings.getProductReviewSettings(), clientContext); + this.listProductReviewsCallable = + callableFactory.createUnaryCallable( + listProductReviewsTransportSettings, + settings.listProductReviewsSettings(), + clientContext); + this.listProductReviewsPagedCallable = + callableFactory.createPagedCallable( + listProductReviewsTransportSettings, + settings.listProductReviewsSettings(), + clientContext); + this.insertProductReviewCallable = + callableFactory.createUnaryCallable( + insertProductReviewTransportSettings, + settings.insertProductReviewSettings(), + clientContext); + this.deleteProductReviewCallable = + callableFactory.createUnaryCallable( + deleteProductReviewTransportSettings, + settings.deleteProductReviewSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getProductReviewCallable() { + return getProductReviewCallable; + } + + @Override + public UnaryCallable + listProductReviewsCallable() { + return listProductReviewsCallable; + } + + @Override + public UnaryCallable + listProductReviewsPagedCallable() { + return listProductReviewsPagedCallable; + } + + @Override + public UnaryCallable insertProductReviewCallable() { + return insertProductReviewCallable; + } + + @Override + public UnaryCallable deleteProductReviewCallable() { + return deleteProductReviewCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/HttpJsonProductReviewsServiceCallableFactory.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/HttpJsonProductReviewsServiceCallableFactory.java new file mode 100644 index 000000000000..5f3704faf520 --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/HttpJsonProductReviewsServiceCallableFactory.java @@ -0,0 +1,103 @@ +/* + * 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.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ProductReviewsService service API. + * + *

This class is for advanced usage. + */ +@NullMarked +@Generated("by gapic-generator-java") +public class HttpJsonProductReviewsServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/HttpJsonProductReviewsServiceStub.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/HttpJsonProductReviewsServiceStub.java new file mode 100644 index 000000000000..8276e3ddd8b5 --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/HttpJsonProductReviewsServiceStub.java @@ -0,0 +1,410 @@ +/* + * 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 static com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient.ListProductReviewsPagedResponse; + +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.GetProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest; +import com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ProductReviewsService service API. + * + *

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 + getProductReviewMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.shopping.merchant.reviews.v1.ProductReviewsService/GetProductReview") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/reviews/v1/{name=accounts/*/productReviews/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProductReview.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listProductReviewsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.shopping.merchant.reviews.v1.ProductReviewsService/ListProductReviews") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/reviews/v1/{parent=accounts/*}/productReviews", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListProductReviewsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + insertProductReviewMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.shopping.merchant.reviews.v1.ProductReviewsService/InsertProductReview") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/reviews/v1/{parent=accounts/*}/productReviews:insert", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "dataSource", request.getDataSource()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("productReview", request.getProductReview(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ProductReview.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteProductReviewMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.shopping.merchant.reviews.v1.ProductReviewsService/DeleteProductReview") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/reviews/v1/{name=accounts/*/productReviews/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable getProductReviewCallable; + private final UnaryCallable + listProductReviewsCallable; + private final UnaryCallable + listProductReviewsPagedCallable; + private final UnaryCallable + insertProductReviewCallable; + private final UnaryCallable deleteProductReviewCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonProductReviewsServiceStub create( + ProductReviewsServiceStubSettings settings) throws IOException { + return new HttpJsonProductReviewsServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonProductReviewsServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonProductReviewsServiceStub( + ProductReviewsServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonProductReviewsServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonProductReviewsServiceStub( + ProductReviewsServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonProductReviewsServiceStub, 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 HttpJsonProductReviewsServiceStub( + ProductReviewsServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonProductReviewsServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonProductReviewsServiceStub, 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 HttpJsonProductReviewsServiceStub( + ProductReviewsServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings getProductReviewTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getProductReviewMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + HttpJsonCallSettings + listProductReviewsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listProductReviewsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + HttpJsonCallSettings + insertProductReviewTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(insertProductReviewMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteProductReviewTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteProductReviewMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getName()) + .build(); + + this.getProductReviewCallable = + callableFactory.createUnaryCallable( + getProductReviewTransportSettings, settings.getProductReviewSettings(), clientContext); + this.listProductReviewsCallable = + callableFactory.createUnaryCallable( + listProductReviewsTransportSettings, + settings.listProductReviewsSettings(), + clientContext); + this.listProductReviewsPagedCallable = + callableFactory.createPagedCallable( + listProductReviewsTransportSettings, + settings.listProductReviewsSettings(), + clientContext); + this.insertProductReviewCallable = + callableFactory.createUnaryCallable( + insertProductReviewTransportSettings, + settings.insertProductReviewSettings(), + clientContext); + this.deleteProductReviewCallable = + callableFactory.createUnaryCallable( + deleteProductReviewTransportSettings, + settings.deleteProductReviewSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getProductReviewMethodDescriptor); + methodDescriptors.add(listProductReviewsMethodDescriptor); + methodDescriptors.add(insertProductReviewMethodDescriptor); + methodDescriptors.add(deleteProductReviewMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable getProductReviewCallable() { + return getProductReviewCallable; + } + + @Override + public UnaryCallable + listProductReviewsCallable() { + return listProductReviewsCallable; + } + + @Override + public UnaryCallable + listProductReviewsPagedCallable() { + return listProductReviewsPagedCallable; + } + + @Override + public UnaryCallable insertProductReviewCallable() { + return insertProductReviewCallable; + } + + @Override + public UnaryCallable deleteProductReviewCallable() { + return deleteProductReviewCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/ProductReviewsServiceStub.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/ProductReviewsServiceStub.java new file mode 100644 index 000000000000..42f866e4d637 --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/ProductReviewsServiceStub.java @@ -0,0 +1,67 @@ +/* + * 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 static com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient.ListProductReviewsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.Empty; +import com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.GetProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest; +import com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ProductReviewsService service API. + * + *

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 getProductReviewCallable() { + throw new UnsupportedOperationException("Not implemented: getProductReviewCallable()"); + } + + public UnaryCallable + listProductReviewsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProductReviewsPagedCallable()"); + } + + public UnaryCallable + listProductReviewsCallable() { + throw new UnsupportedOperationException("Not implemented: listProductReviewsCallable()"); + } + + public UnaryCallable insertProductReviewCallable() { + throw new UnsupportedOperationException("Not implemented: insertProductReviewCallable()"); + } + + public UnaryCallable deleteProductReviewCallable() { + throw new UnsupportedOperationException("Not implemented: deleteProductReviewCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/ProductReviewsServiceStubSettings.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/ProductReviewsServiceStubSettings.java new file mode 100644 index 000000000000..cdd3855f15c9 --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/ProductReviewsServiceStubSettings.java @@ -0,0 +1,516 @@ +/* + * 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 static com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient.ListProductReviewsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.GetProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest; +import com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ProductReviewsServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (merchantapi.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

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
+ * 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 { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/content").build(); + + private final UnaryCallSettings getProductReviewSettings; + private final PagedCallSettings< + ListProductReviewsRequest, ListProductReviewsResponse, ListProductReviewsPagedResponse> + listProductReviewsSettings; + private final UnaryCallSettings + insertProductReviewSettings; + private final UnaryCallSettings deleteProductReviewSettings; + + private static final PagedListDescriptor< + ListProductReviewsRequest, ListProductReviewsResponse, ProductReview> + LIST_PRODUCT_REVIEWS_PAGE_STR_DESC = + new PagedListDescriptor< + ListProductReviewsRequest, ListProductReviewsResponse, ProductReview>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductReviewsRequest injectToken( + ListProductReviewsRequest payload, String token) { + return ListProductReviewsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProductReviewsRequest injectPageSize( + ListProductReviewsRequest payload, int pageSize) { + return ListProductReviewsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProductReviewsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductReviewsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductReviewsResponse payload) { + return payload.getProductReviewsList(); + } + }; + + private static final PagedListResponseFactory< + ListProductReviewsRequest, ListProductReviewsResponse, ListProductReviewsPagedResponse> + LIST_PRODUCT_REVIEWS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductReviewsRequest, + ListProductReviewsResponse, + ListProductReviewsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProductReviewsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_PRODUCT_REVIEWS_PAGE_STR_DESC, request, context); + return ListProductReviewsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to getProductReview. */ + public UnaryCallSettings getProductReviewSettings() { + return getProductReviewSettings; + } + + /** Returns the object with the settings used for calls to listProductReviews. */ + public PagedCallSettings< + ListProductReviewsRequest, ListProductReviewsResponse, ListProductReviewsPagedResponse> + listProductReviewsSettings() { + return listProductReviewsSettings; + } + + /** Returns the object with the settings used for calls to insertProductReview. */ + public UnaryCallSettings + insertProductReviewSettings() { + return insertProductReviewSettings; + } + + /** Returns the object with the settings used for calls to deleteProductReview. */ + public UnaryCallSettings deleteProductReviewSettings() { + return deleteProductReviewSettings; + } + + public ProductReviewsServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcProductReviewsServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonProductReviewsServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "merchantapi"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "merchantapi.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "merchantapi.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ProductReviewsServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ProductReviewsServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ProductReviewsServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(@Nullable ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ProductReviewsServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getProductReviewSettings = settingsBuilder.getProductReviewSettings().build(); + listProductReviewsSettings = settingsBuilder.listProductReviewsSettings().build(); + insertProductReviewSettings = settingsBuilder.insertProductReviewSettings().build(); + deleteProductReviewSettings = settingsBuilder.deleteProductReviewSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.shopping:google-shopping-merchant-reviews") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for ProductReviewsServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + getProductReviewSettings; + private final PagedCallSettings.Builder< + ListProductReviewsRequest, ListProductReviewsResponse, ListProductReviewsPagedResponse> + listProductReviewsSettings; + private final UnaryCallSettings.Builder + insertProductReviewSettings; + private final UnaryCallSettings.Builder + deleteProductReviewSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(10000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L)) + .setTotalTimeoutDuration(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(@Nullable ClientContext clientContext) { + super(clientContext); + + getProductReviewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProductReviewsSettings = PagedCallSettings.newBuilder(LIST_PRODUCT_REVIEWS_PAGE_STR_FACT); + insertProductReviewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteProductReviewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getProductReviewSettings, + listProductReviewsSettings, + insertProductReviewSettings, + deleteProductReviewSettings); + initDefaults(this); + } + + protected Builder(ProductReviewsServiceStubSettings settings) { + super(settings); + + getProductReviewSettings = settings.getProductReviewSettings.toBuilder(); + listProductReviewsSettings = settings.listProductReviewsSettings.toBuilder(); + insertProductReviewSettings = settings.insertProductReviewSettings.toBuilder(); + deleteProductReviewSettings = settings.deleteProductReviewSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getProductReviewSettings, + listProductReviewsSettings, + insertProductReviewSettings, + deleteProductReviewSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getProductReviewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listProductReviewsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .insertProductReviewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteProductReviewSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getProductReview. */ + public UnaryCallSettings.Builder + getProductReviewSettings() { + return getProductReviewSettings; + } + + /** Returns the builder for the settings used for calls to listProductReviews. */ + public PagedCallSettings.Builder< + ListProductReviewsRequest, ListProductReviewsResponse, ListProductReviewsPagedResponse> + listProductReviewsSettings() { + return listProductReviewsSettings; + } + + /** Returns the builder for the settings used for calls to insertProductReview. */ + public UnaryCallSettings.Builder + insertProductReviewSettings() { + return insertProductReviewSettings; + } + + /** Returns the builder for the settings used for calls to deleteProductReview. */ + public UnaryCallSettings.Builder + deleteProductReviewSettings() { + return deleteProductReviewSettings; + } + + @Override + public ProductReviewsServiceStubSettings build() throws IOException { + return new ProductReviewsServiceStubSettings(this); + } + } +} diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/Version.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/Version.java new file mode 100644 index 000000000000..1951353d9022 --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/java/com/google/shopping/merchant/reviews/v1/stub/Version.java @@ -0,0 +1,27 @@ +/* + * 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.core.InternalApi; + +@InternalApi("For internal use only") +final class Version { + // {x-version-update-start:google-shopping-merchant-reviews:current} + static final String VERSION = "0.0.0-SNAPSHOT"; + // {x-version-update-end} + +} diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/resources/META-INF/native-image/com.google.shopping.merchant.reviews.v1/reflect-config.json b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/resources/META-INF/native-image/com.google.shopping.merchant.reviews.v1/reflect-config.json new file mode 100644 index 000000000000..179ecc50d7eb --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/main/resources/META-INF/native-image/com.google.shopping.merchant.reviews.v1/reflect-config.json @@ -0,0 +1,1694 @@ +[ + { + "name": "com.google.api.BatchingConfigProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingConfigProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.BatchingSettingsProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryDestination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibraryOrganization", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ClientLibrarySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CommonLanguageSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CppSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.CustomHttpPattern$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.DotnetSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FieldBehavior", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.FlowControlLimitExceededBehaviorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.GoSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Http$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.HttpRule$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.JavaSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.LaunchStage", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.MethodSettings$LongRunning$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.NodeSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PhpSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.Publishing$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.PythonSettings$ExperimentalFeatures$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$History", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceDescriptor$Style", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.ResourceReference$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.RubySettings$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.api.SelectiveGapicGeneration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$Edition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumDescriptorProto$EnumReservedRange$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$Declaration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ExtensionRangeOptions$VerificationState", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnforceNamingStyle", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$EnumType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$FieldPresence", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$JsonFormat", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$MessageEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$RepeatedFieldEncoding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$Utf8Validation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSet$VisibilityFeature$DefaultSymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FeatureSetDefaults$FeatureSetEditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$CType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$EditionDefault$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$FeatureSupport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$JSType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionRetention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FieldOptions$OptionTargetType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Semantic", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MessageOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$MethodOptions$IdempotencyLevel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$OneofOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceDescriptorProto$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$ServiceOptions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SourceCodeInfo$Location$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$SymbolVisibility", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.DescriptorProtos$UninterpretedOption$NamePart$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Duration$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Empty$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.Timestamp$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.GetProductReviewRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.GetProductReviewRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReview", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReview$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewAttributes", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewAttributes$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewAttributes$CollectionMethod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewAttributes$ReviewLink", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewAttributes$ReviewLink$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewAttributes$ReviewLink$Type", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewStatus$ProductReviewDestinationStatus", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewStatus$ProductReviewDestinationStatus$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewStatus$ProductReviewItemLevelIssue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewStatus$ProductReviewItemLevelIssue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.merchant.reviews.v1.ProductReviewStatus$ProductReviewItemLevelIssue$Severity", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Channel", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Channel$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Channel$ChannelEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.CustomAttribute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.CustomAttribute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Destination", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Destination$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Destination$DestinationEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Price", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Price$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.ReportingContext", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.ReportingContext$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.ReportingContext$ReportingContextEnum", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Weight", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Weight$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.shopping.type.Weight$WeightUnit", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + } +] \ No newline at end of file diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/test/java/com/google/shopping/merchant/reviews/v1/MockProductReviewsService.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/test/java/com/google/shopping/merchant/reviews/v1/MockProductReviewsService.java new file mode 100644 index 000000000000..3aeb65c307c5 --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/test/java/com/google/shopping/merchant/reviews/v1/MockProductReviewsService.java @@ -0,0 +1,59 @@ +/* + * 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; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockProductReviewsService implements MockGrpcService { + private final MockProductReviewsServiceImpl serviceImpl; + + public MockProductReviewsService() { + serviceImpl = new MockProductReviewsServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/test/java/com/google/shopping/merchant/reviews/v1/MockProductReviewsServiceImpl.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/test/java/com/google/shopping/merchant/reviews/v1/MockProductReviewsServiceImpl.java new file mode 100644 index 000000000000..5aa1610a95ed --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/test/java/com/google/shopping/merchant/reviews/v1/MockProductReviewsServiceImpl.java @@ -0,0 +1,146 @@ +/* + * 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; + +import com.google.api.core.BetaApi; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceGrpc.ProductReviewsServiceImplBase; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockProductReviewsServiceImpl extends ProductReviewsServiceImplBase { + private List requests; + private Queue responses; + + public MockProductReviewsServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void getProductReview( + GetProductReviewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProductReview) { + requests.add(request); + responseObserver.onNext(((ProductReview) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetProductReview, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProductReview.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listProductReviews( + ListProductReviewsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListProductReviewsResponse) { + requests.add(request); + responseObserver.onNext(((ListProductReviewsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListProductReviews, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListProductReviewsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void insertProductReview( + InsertProductReviewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ProductReview) { + requests.add(request); + responseObserver.onNext(((ProductReview) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method InsertProductReview, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ProductReview.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteProductReview( + DeleteProductReviewRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteProductReview, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/test/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceClientHttpJsonTest.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/test/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..085fc3bc6311 --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/test/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceClientHttpJsonTest.java @@ -0,0 +1,417 @@ +/* + * 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; + +import static com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient.ListProductReviewsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import com.google.shopping.merchant.reviews.v1.stub.HttpJsonProductReviewsServiceStub; +import com.google.shopping.type.CustomAttribute; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ProductReviewsServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static ProductReviewsServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonProductReviewsServiceStub.getMethodDescriptors(), + ProductReviewsServiceSettings.getDefaultEndpoint()); + ProductReviewsServiceSettings settings = + ProductReviewsServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + ProductReviewsServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ProductReviewsServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getProductReviewTest() throws Exception { + ProductReview expectedResponse = + ProductReview.newBuilder() + .setName(ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]").toString()) + .setProductReviewId("productReviewId-114402142") + .setProductReviewAttributes(ProductReviewAttributes.newBuilder().build()) + .addAllCustomAttributes(new ArrayList()) + .setDataSource("dataSource1272470629") + .setProductReviewStatus(ProductReviewStatus.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]"); + + ProductReview actualResponse = client.getProductReview(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductReviewExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]"); + client.getProductReview(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductReviewTest2() throws Exception { + ProductReview expectedResponse = + ProductReview.newBuilder() + .setName(ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]").toString()) + .setProductReviewId("productReviewId-114402142") + .setProductReviewAttributes(ProductReviewAttributes.newBuilder().build()) + .addAllCustomAttributes(new ArrayList()) + .setDataSource("dataSource1272470629") + .setProductReviewStatus(ProductReviewStatus.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "accounts/account-6554/productReviews/productReview-6554"; + + ProductReview actualResponse = client.getProductReview(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getProductReviewExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "accounts/account-6554/productReviews/productReview-6554"; + client.getProductReview(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductReviewsTest() throws Exception { + ProductReview responsesElement = ProductReview.newBuilder().build(); + ListProductReviewsResponse expectedResponse = + ListProductReviewsResponse.newBuilder() + .setNextPageToken("") + .addAllProductReviews(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + AccountName parent = AccountName.of("[ACCOUNT]"); + + ListProductReviewsPagedResponse pagedListResponse = client.listProductReviews(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductReviewsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductReviewsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AccountName parent = AccountName.of("[ACCOUNT]"); + client.listProductReviews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductReviewsTest2() throws Exception { + ProductReview responsesElement = ProductReview.newBuilder().build(); + ListProductReviewsResponse expectedResponse = + ListProductReviewsResponse.newBuilder() + .setNextPageToken("") + .addAllProductReviews(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "accounts/account-4811"; + + ListProductReviewsPagedResponse pagedListResponse = client.listProductReviews(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductReviewsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listProductReviewsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "accounts/account-4811"; + client.listProductReviews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void insertProductReviewTest() throws Exception { + ProductReview expectedResponse = + ProductReview.newBuilder() + .setName(ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]").toString()) + .setProductReviewId("productReviewId-114402142") + .setProductReviewAttributes(ProductReviewAttributes.newBuilder().build()) + .addAllCustomAttributes(new ArrayList()) + .setDataSource("dataSource1272470629") + .setProductReviewStatus(ProductReviewStatus.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + InsertProductReviewRequest request = + InsertProductReviewRequest.newBuilder() + .setParent("accounts/account-4811") + .setProductReview(ProductReview.newBuilder().build()) + .setDataSource("dataSource1272470629") + .build(); + + ProductReview actualResponse = client.insertProductReview(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void insertProductReviewExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InsertProductReviewRequest request = + InsertProductReviewRequest.newBuilder() + .setParent("accounts/account-4811") + .setProductReview(ProductReview.newBuilder().build()) + .setDataSource("dataSource1272470629") + .build(); + client.insertProductReview(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductReviewTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]"); + + client.deleteProductReview(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductReviewExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]"); + client.deleteProductReview(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductReviewTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "accounts/account-6554/productReviews/productReview-6554"; + + client.deleteProductReview(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteProductReviewExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "accounts/account-6554/productReviews/productReview-6554"; + client.deleteProductReview(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/test/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceClientTest.java b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/test/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceClientTest.java new file mode 100644 index 000000000000..8eab7cf9a398 --- /dev/null +++ b/java-shopping-merchant-reviews/google-shopping-merchant-reviews/src/test/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceClientTest.java @@ -0,0 +1,381 @@ +/* + * 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; + +import static com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient.ListProductReviewsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.shopping.type.CustomAttribute; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class ProductReviewsServiceClientTest { + private static MockProductReviewsService mockProductReviewsService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private ProductReviewsServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockProductReviewsService = new MockProductReviewsService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockProductReviewsService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ProductReviewsServiceSettings settings = + ProductReviewsServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ProductReviewsServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getProductReviewTest() throws Exception { + ProductReview expectedResponse = + ProductReview.newBuilder() + .setName(ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]").toString()) + .setProductReviewId("productReviewId-114402142") + .setProductReviewAttributes(ProductReviewAttributes.newBuilder().build()) + .addAllCustomAttributes(new ArrayList()) + .setDataSource("dataSource1272470629") + .setProductReviewStatus(ProductReviewStatus.newBuilder().build()) + .build(); + mockProductReviewsService.addResponse(expectedResponse); + + ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]"); + + ProductReview actualResponse = client.getProductReview(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductReviewsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductReviewRequest actualRequest = ((GetProductReviewRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductReviewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductReviewsService.addException(exception); + + try { + ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]"); + client.getProductReview(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProductReviewTest2() throws Exception { + ProductReview expectedResponse = + ProductReview.newBuilder() + .setName(ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]").toString()) + .setProductReviewId("productReviewId-114402142") + .setProductReviewAttributes(ProductReviewAttributes.newBuilder().build()) + .addAllCustomAttributes(new ArrayList()) + .setDataSource("dataSource1272470629") + .setProductReviewStatus(ProductReviewStatus.newBuilder().build()) + .build(); + mockProductReviewsService.addResponse(expectedResponse); + + String name = "name3373707"; + + ProductReview actualResponse = client.getProductReview(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductReviewsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProductReviewRequest actualRequest = ((GetProductReviewRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProductReviewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductReviewsService.addException(exception); + + try { + String name = "name3373707"; + client.getProductReview(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductReviewsTest() throws Exception { + ProductReview responsesElement = ProductReview.newBuilder().build(); + ListProductReviewsResponse expectedResponse = + ListProductReviewsResponse.newBuilder() + .setNextPageToken("") + .addAllProductReviews(Arrays.asList(responsesElement)) + .build(); + mockProductReviewsService.addResponse(expectedResponse); + + AccountName parent = AccountName.of("[ACCOUNT]"); + + ListProductReviewsPagedResponse pagedListResponse = client.listProductReviews(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductReviewsList().get(0), resources.get(0)); + + List actualRequests = mockProductReviewsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductReviewsRequest actualRequest = ((ListProductReviewsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductReviewsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductReviewsService.addException(exception); + + try { + AccountName parent = AccountName.of("[ACCOUNT]"); + client.listProductReviews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductReviewsTest2() throws Exception { + ProductReview responsesElement = ProductReview.newBuilder().build(); + ListProductReviewsResponse expectedResponse = + ListProductReviewsResponse.newBuilder() + .setNextPageToken("") + .addAllProductReviews(Arrays.asList(responsesElement)) + .build(); + mockProductReviewsService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListProductReviewsPagedResponse pagedListResponse = client.listProductReviews(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductReviewsList().get(0), resources.get(0)); + + List actualRequests = mockProductReviewsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductReviewsRequest actualRequest = ((ListProductReviewsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductReviewsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductReviewsService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listProductReviews(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void insertProductReviewTest() throws Exception { + ProductReview expectedResponse = + ProductReview.newBuilder() + .setName(ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]").toString()) + .setProductReviewId("productReviewId-114402142") + .setProductReviewAttributes(ProductReviewAttributes.newBuilder().build()) + .addAllCustomAttributes(new ArrayList()) + .setDataSource("dataSource1272470629") + .setProductReviewStatus(ProductReviewStatus.newBuilder().build()) + .build(); + mockProductReviewsService.addResponse(expectedResponse); + + InsertProductReviewRequest request = + InsertProductReviewRequest.newBuilder() + .setParent("parent-995424086") + .setProductReview(ProductReview.newBuilder().build()) + .setDataSource("dataSource1272470629") + .build(); + + ProductReview actualResponse = client.insertProductReview(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockProductReviewsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + InsertProductReviewRequest actualRequest = ((InsertProductReviewRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getProductReview(), actualRequest.getProductReview()); + Assert.assertEquals(request.getDataSource(), actualRequest.getDataSource()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void insertProductReviewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductReviewsService.addException(exception); + + try { + InsertProductReviewRequest request = + InsertProductReviewRequest.newBuilder() + .setParent("parent-995424086") + .setProductReview(ProductReview.newBuilder().build()) + .setDataSource("dataSource1272470629") + .build(); + client.insertProductReview(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductReviewTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductReviewsService.addResponse(expectedResponse); + + ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]"); + + client.deleteProductReview(name); + + List actualRequests = mockProductReviewsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductReviewRequest actualRequest = ((DeleteProductReviewRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductReviewExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductReviewsService.addException(exception); + + try { + ProductReviewName name = ProductReviewName.of("[ACCOUNT]", "[PRODUCTREVIEW]"); + client.deleteProductReview(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteProductReviewTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockProductReviewsService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteProductReview(name); + + List actualRequests = mockProductReviewsService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteProductReviewRequest actualRequest = ((DeleteProductReviewRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteProductReviewExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockProductReviewsService.addException(exception); + + try { + String name = "name3373707"; + client.deleteProductReview(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-shopping-merchant-reviews/grpc-google-shopping-merchant-reviews-v1/pom.xml b/java-shopping-merchant-reviews/grpc-google-shopping-merchant-reviews-v1/pom.xml new file mode 100644 index 000000000000..8144ccecadac --- /dev/null +++ b/java-shopping-merchant-reviews/grpc-google-shopping-merchant-reviews-v1/pom.xml @@ -0,0 +1,45 @@ + + 4.0.0 + com.google.shopping.api.grpc + grpc-google-shopping-merchant-reviews-v1 + 0.46.0-SNAPSHOT + grpc-google-shopping-merchant-reviews-v1 + GRPC library for google-shopping-merchant-reviews + + com.google.shopping + google-shopping-merchant-reviews-parent + 0.46.0-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.shopping.api.grpc + proto-google-shopping-merchant-reviews-v1 + + + com.google.guava + guava + + + diff --git a/java-shopping-merchant-reviews/grpc-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceGrpc.java b/java-shopping-merchant-reviews/grpc-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceGrpc.java new file mode 100644 index 000000000000..4c5d608942d1 --- /dev/null +++ b/java-shopping-merchant-reviews/grpc-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsServiceGrpc.java @@ -0,0 +1,842 @@ +/* + * 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; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service to manage product reviews.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class ProductReviewsServiceGrpc { + + private ProductReviewsServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.shopping.merchant.reviews.v1.ProductReviewsService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest, + com.google.shopping.merchant.reviews.v1.ProductReview> + getGetProductReviewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProductReview", + requestType = com.google.shopping.merchant.reviews.v1.GetProductReviewRequest.class, + responseType = com.google.shopping.merchant.reviews.v1.ProductReview.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest, + com.google.shopping.merchant.reviews.v1.ProductReview> + getGetProductReviewMethod() { + io.grpc.MethodDescriptor< + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest, + com.google.shopping.merchant.reviews.v1.ProductReview> + getGetProductReviewMethod; + if ((getGetProductReviewMethod = ProductReviewsServiceGrpc.getGetProductReviewMethod) == null) { + synchronized (ProductReviewsServiceGrpc.class) { + if ((getGetProductReviewMethod = ProductReviewsServiceGrpc.getGetProductReviewMethod) + == null) { + ProductReviewsServiceGrpc.getGetProductReviewMethod = + getGetProductReviewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetProductReview")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.shopping.merchant.reviews.v1.ProductReview + .getDefaultInstance())) + .setSchemaDescriptor( + new ProductReviewsServiceMethodDescriptorSupplier("GetProductReview")) + .build(); + } + } + } + return getGetProductReviewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest, + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse> + getListProductReviewsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProductReviews", + requestType = com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest.class, + responseType = com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest, + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse> + getListProductReviewsMethod() { + io.grpc.MethodDescriptor< + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest, + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse> + getListProductReviewsMethod; + if ((getListProductReviewsMethod = ProductReviewsServiceGrpc.getListProductReviewsMethod) + == null) { + synchronized (ProductReviewsServiceGrpc.class) { + if ((getListProductReviewsMethod = ProductReviewsServiceGrpc.getListProductReviewsMethod) + == null) { + ProductReviewsServiceGrpc.getListProductReviewsMethod = + getListProductReviewsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProductReviews")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ProductReviewsServiceMethodDescriptorSupplier("ListProductReviews")) + .build(); + } + } + } + return getListProductReviewsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest, + com.google.shopping.merchant.reviews.v1.ProductReview> + getInsertProductReviewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "InsertProductReview", + requestType = com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest.class, + responseType = com.google.shopping.merchant.reviews.v1.ProductReview.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest, + com.google.shopping.merchant.reviews.v1.ProductReview> + getInsertProductReviewMethod() { + io.grpc.MethodDescriptor< + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest, + com.google.shopping.merchant.reviews.v1.ProductReview> + getInsertProductReviewMethod; + if ((getInsertProductReviewMethod = ProductReviewsServiceGrpc.getInsertProductReviewMethod) + == null) { + synchronized (ProductReviewsServiceGrpc.class) { + if ((getInsertProductReviewMethod = ProductReviewsServiceGrpc.getInsertProductReviewMethod) + == null) { + ProductReviewsServiceGrpc.getInsertProductReviewMethod = + getInsertProductReviewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "InsertProductReview")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.shopping.merchant.reviews.v1.ProductReview + .getDefaultInstance())) + .setSchemaDescriptor( + new ProductReviewsServiceMethodDescriptorSupplier("InsertProductReview")) + .build(); + } + } + } + return getInsertProductReviewMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest, + com.google.protobuf.Empty> + getDeleteProductReviewMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteProductReview", + requestType = com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest, + com.google.protobuf.Empty> + getDeleteProductReviewMethod() { + io.grpc.MethodDescriptor< + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest, + com.google.protobuf.Empty> + getDeleteProductReviewMethod; + if ((getDeleteProductReviewMethod = ProductReviewsServiceGrpc.getDeleteProductReviewMethod) + == null) { + synchronized (ProductReviewsServiceGrpc.class) { + if ((getDeleteProductReviewMethod = ProductReviewsServiceGrpc.getDeleteProductReviewMethod) + == null) { + ProductReviewsServiceGrpc.getDeleteProductReviewMethod = + getDeleteProductReviewMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteProductReview")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new ProductReviewsServiceMethodDescriptorSupplier("DeleteProductReview")) + .build(); + } + } + } + return getDeleteProductReviewMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ProductReviewsServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductReviewsServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductReviewsServiceStub(channel, callOptions); + } + }; + return ProductReviewsServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static ProductReviewsServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductReviewsServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductReviewsServiceBlockingV2Stub(channel, callOptions); + } + }; + return ProductReviewsServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ProductReviewsServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductReviewsServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductReviewsServiceBlockingStub(channel, callOptions); + } + }; + return ProductReviewsServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ProductReviewsServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ProductReviewsServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductReviewsServiceFutureStub(channel, callOptions); + } + }; + return ProductReviewsServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service to manage product reviews.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Gets a product review.
+     * 
+ */ + default void getProductReview( + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetProductReviewMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists product reviews.
+     * 
+ */ + default void listProductReviews( + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest request, + io.grpc.stub.StreamObserver< + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListProductReviewsMethod(), responseObserver); + } + + /** + * + * + *
+     * Inserts a product review.
+     * 
+ */ + default void insertProductReview( + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getInsertProductReviewMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a product review.
+     * 
+ */ + default void deleteProductReview( + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteProductReviewMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service ProductReviewsService. + * + *
+   * Service to manage product reviews.
+   * 
+ */ + public abstract static class ProductReviewsServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return ProductReviewsServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service ProductReviewsService. + * + *
+   * Service to manage product reviews.
+   * 
+ */ + public static final class ProductReviewsServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ProductReviewsServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductReviewsServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductReviewsServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets a product review.
+     * 
+ */ + public void getProductReview( + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProductReviewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists product reviews.
+     * 
+ */ + public void listProductReviews( + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest request, + io.grpc.stub.StreamObserver< + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListProductReviewsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Inserts a product review.
+     * 
+ */ + public void insertProductReview( + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getInsertProductReviewMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a product review.
+     * 
+ */ + public void deleteProductReview( + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteProductReviewMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service ProductReviewsService. + * + *
+   * Service to manage product reviews.
+   * 
+ */ + public static final class ProductReviewsServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private ProductReviewsServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductReviewsServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductReviewsServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Gets a product review.
+     * 
+ */ + public com.google.shopping.merchant.reviews.v1.ProductReview getProductReview( + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getGetProductReviewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists product reviews.
+     * 
+ */ + public com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse listProductReviews( + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListProductReviewsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Inserts a product review.
+     * 
+ */ + public com.google.shopping.merchant.reviews.v1.ProductReview insertProductReview( + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getInsertProductReviewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a product review.
+     * 
+ */ + public com.google.protobuf.Empty deleteProductReview( + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getDeleteProductReviewMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service ProductReviewsService. + * + *
+   * Service to manage product reviews.
+   * 
+ */ + public static final class ProductReviewsServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ProductReviewsServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductReviewsServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductReviewsServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets a product review.
+     * 
+ */ + public com.google.shopping.merchant.reviews.v1.ProductReview getProductReview( + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProductReviewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists product reviews.
+     * 
+ */ + public com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse listProductReviews( + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListProductReviewsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Inserts a product review.
+     * 
+ */ + public com.google.shopping.merchant.reviews.v1.ProductReview insertProductReview( + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getInsertProductReviewMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a product review.
+     * 
+ */ + public com.google.protobuf.Empty deleteProductReview( + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteProductReviewMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * ProductReviewsService. + * + *
+   * Service to manage product reviews.
+   * 
+ */ + public static final class ProductReviewsServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ProductReviewsServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ProductReviewsServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ProductReviewsServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets a product review.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.shopping.merchant.reviews.v1.ProductReview> + getProductReview(com.google.shopping.merchant.reviews.v1.GetProductReviewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProductReviewMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists product reviews.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse> + listProductReviews( + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListProductReviewsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Inserts a product review.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.shopping.merchant.reviews.v1.ProductReview> + insertProductReview( + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getInsertProductReviewMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a product review.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteProductReview( + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteProductReviewMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_PRODUCT_REVIEW = 0; + private static final int METHODID_LIST_PRODUCT_REVIEWS = 1; + private static final int METHODID_INSERT_PRODUCT_REVIEW = 2; + private static final int METHODID_DELETE_PRODUCT_REVIEW = 3; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_PRODUCT_REVIEW: + serviceImpl.getProductReview( + (com.google.shopping.merchant.reviews.v1.GetProductReviewRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PRODUCT_REVIEWS: + serviceImpl.listProductReviews( + (com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse>) + responseObserver); + break; + case METHODID_INSERT_PRODUCT_REVIEW: + serviceImpl.insertProductReview( + (com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_DELETE_PRODUCT_REVIEW: + serviceImpl.deleteProductReview( + (com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetProductReviewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest, + com.google.shopping.merchant.reviews.v1.ProductReview>( + service, METHODID_GET_PRODUCT_REVIEW))) + .addMethod( + getListProductReviewsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest, + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse>( + service, METHODID_LIST_PRODUCT_REVIEWS))) + .addMethod( + getInsertProductReviewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest, + com.google.shopping.merchant.reviews.v1.ProductReview>( + service, METHODID_INSERT_PRODUCT_REVIEW))) + .addMethod( + getDeleteProductReviewMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest, + com.google.protobuf.Empty>(service, METHODID_DELETE_PRODUCT_REVIEW))) + .build(); + } + + private abstract static class ProductReviewsServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ProductReviewsServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ProductReviewsService"); + } + } + + private static final class ProductReviewsServiceFileDescriptorSupplier + extends ProductReviewsServiceBaseDescriptorSupplier { + ProductReviewsServiceFileDescriptorSupplier() {} + } + + private static final class ProductReviewsServiceMethodDescriptorSupplier + extends ProductReviewsServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + ProductReviewsServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (ProductReviewsServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ProductReviewsServiceFileDescriptorSupplier()) + .addMethod(getGetProductReviewMethod()) + .addMethod(getListProductReviewsMethod()) + .addMethod(getInsertProductReviewMethod()) + .addMethod(getDeleteProductReviewMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-shopping-merchant-reviews/pom.xml b/java-shopping-merchant-reviews/pom.xml index 23a827adeab3..f825531470e9 100644 --- a/java-shopping-merchant-reviews/pom.xml +++ b/java-shopping-merchant-reviews/pom.xml @@ -32,11 +32,21 @@ google-shopping-merchant-reviews 0.46.0-SNAPSHOT + + com.google.shopping.api.grpc + grpc-google-shopping-merchant-reviews-v1 + 0.46.0-SNAPSHOT + com.google.shopping.api.grpc grpc-google-shopping-merchant-reviews-v1beta 0.46.0-SNAPSHOT + + com.google.shopping.api.grpc + proto-google-shopping-merchant-reviews-v1 + 0.46.0-SNAPSHOT + com.google.shopping.api.grpc proto-google-shopping-merchant-reviews-v1beta @@ -50,7 +60,9 @@ google-shopping-merchant-reviews + grpc-google-shopping-merchant-reviews-v1 grpc-google-shopping-merchant-reviews-v1beta + proto-google-shopping-merchant-reviews-v1 proto-google-shopping-merchant-reviews-v1beta google-shopping-merchant-reviews-bom diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/clirr-ignored-differences.xml b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/clirr-ignored-differences.xml new file mode 100644 index 000000000000..7fa2e3d059f9 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/clirr-ignored-differences.xml @@ -0,0 +1,80 @@ + + + + + 7012 + com/google/shopping/merchant/reviews/v1/*OrBuilder + * get*(*) + + + 7012 + com/google/shopping/merchant/reviews/v1/*OrBuilder + boolean contains*(*) + + + 7012 + com/google/shopping/merchant/reviews/v1/*OrBuilder + boolean has*(*) + + + + 7006 + com/google/shopping/merchant/reviews/v1/** + * getDefaultInstanceForType() + ** + + + 7006 + com/google/shopping/merchant/reviews/v1/** + * addRepeatedField(*) + ** + + + 7006 + com/google/shopping/merchant/reviews/v1/** + * clear() + ** + + + 7006 + com/google/shopping/merchant/reviews/v1/** + * clearField(*) + ** + + + 7006 + com/google/shopping/merchant/reviews/v1/** + * clearOneof(*) + ** + + + 7006 + com/google/shopping/merchant/reviews/v1/** + * clone() + ** + + + 7006 + com/google/shopping/merchant/reviews/v1/** + * mergeUnknownFields(*) + ** + + + 7006 + com/google/shopping/merchant/reviews/v1/** + * setField(*) + ** + + + 7006 + com/google/shopping/merchant/reviews/v1/** + * setRepeatedField(*) + ** + + + 7006 + com/google/shopping/merchant/reviews/v1/** + * setUnknownFields(*) + ** + + diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/pom.xml b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/pom.xml new file mode 100644 index 000000000000..be199f9ba505 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/pom.xml @@ -0,0 +1,41 @@ + + 4.0.0 + com.google.shopping.api.grpc + proto-google-shopping-merchant-reviews-v1 + 0.46.0-SNAPSHOT + proto-google-shopping-merchant-reviews-v1 + Proto library for google-shopping-merchant-reviews + + com.google.shopping + google-shopping-merchant-reviews-parent + 0.46.0-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + com.google.api + api-common + + + com.google.guava + guava + + + org.jspecify + jspecify + + + diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/AccountName.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/AccountName.java new file mode 100644 index 000000000000..9cef939dd54b --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/AccountName.java @@ -0,0 +1,171 @@ +/* + * 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; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class AccountName implements ResourceName { + private static final PathTemplate ACCOUNT = + PathTemplate.createWithoutUrlEncoding("accounts/{account}"); + private volatile Map fieldValuesMap; + private final String account; + + @Deprecated + protected AccountName() { + account = null; + } + + private AccountName(Builder builder) { + account = Preconditions.checkNotNull(builder.getAccount()); + } + + public String getAccount() { + return account; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AccountName of(String account) { + return newBuilder().setAccount(account).build(); + } + + public static String format(String account) { + return newBuilder().setAccount(account).build().toString(); + } + + public static @Nullable AccountName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ACCOUNT.validatedMatch( + formattedString, "AccountName.parse: formattedString not in valid format"); + return of(matchMap.get("account")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List<@Nullable AccountName> values) { + List list = new ArrayList<>(values.size()); + for (AccountName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ACCOUNT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (account != null) { + fieldMapBuilder.put("account", account); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ACCOUNT.instantiate("account", account); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AccountName that = ((AccountName) o); + return Objects.equals(this.account, that.account); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(account); + return h; + } + + /** Builder for accounts/{account}. */ + public static class Builder { + private String account; + + protected Builder() {} + + public String getAccount() { + return account; + } + + public Builder setAccount(String account) { + this.account = account; + return this; + } + + private Builder(AccountName accountName) { + this.account = accountName.account; + } + + public AccountName build() { + return new AccountName(this); + } + } +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/DeleteProductReviewRequest.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/DeleteProductReviewRequest.java new file mode 100644 index 000000000000..8b77ca161666 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/DeleteProductReviewRequest.java @@ -0,0 +1,629 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +/** + * + * + *
+ * Request message for the `DeleteProductReview` method.
+ * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.DeleteProductReviewRequest} + */ +@com.google.protobuf.Generated +public final class DeleteProductReviewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reviews.v1.DeleteProductReviewRequest) + DeleteProductReviewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "DeleteProductReviewRequest"); + } + + // Use DeleteProductReviewRequest.newBuilder() to construct. + private DeleteProductReviewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private DeleteProductReviewRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_DeleteProductReviewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_DeleteProductReviewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest.class, + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The ID of the Product review.
+   * Format: accounts/{account}/productReviews/{productReview}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID of the Product review.
+   * Format: accounts/{account}/productReviews/{productReview}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest)) { + return super.equals(obj); + } + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest other = + (com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the `DeleteProductReview` method.
+   * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.DeleteProductReviewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reviews.v1.DeleteProductReviewRequest) + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_DeleteProductReviewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_DeleteProductReviewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest.class, + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest.Builder.class); + } + + // Construct using + // com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_DeleteProductReviewRequest_descriptor; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest + getDefaultInstanceForType() { + return com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest build() { + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest buildPartial() { + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest result = + new com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest) { + return mergeFrom( + (com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest other) { + if (other + == com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The ID of the Product review.
+     * Format: accounts/{account}/productReviews/{productReview}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID of the Product review.
+     * Format: accounts/{account}/productReviews/{productReview}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID of the Product review.
+     * Format: accounts/{account}/productReviews/{productReview}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the Product review.
+     * Format: accounts/{account}/productReviews/{productReview}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the Product review.
+     * Format: accounts/{account}/productReviews/{productReview}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reviews.v1.DeleteProductReviewRequest) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reviews.v1.DeleteProductReviewRequest) + private static final com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest(); + } + + public static com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteProductReviewRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/DeleteProductReviewRequestOrBuilder.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/DeleteProductReviewRequestOrBuilder.java new file mode 100644 index 000000000000..8a953da0c049 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/DeleteProductReviewRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +@com.google.protobuf.Generated +public interface DeleteProductReviewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reviews.v1.DeleteProductReviewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The ID of the Product review.
+   * Format: accounts/{account}/productReviews/{productReview}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The ID of the Product review.
+   * Format: accounts/{account}/productReviews/{productReview}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/GetProductReviewRequest.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/GetProductReviewRequest.java new file mode 100644 index 000000000000..759639ad2345 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/GetProductReviewRequest.java @@ -0,0 +1,625 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +/** + * + * + *
+ * Request message for the GetProductReview method.
+ * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.GetProductReviewRequest} + */ +@com.google.protobuf.Generated +public final class GetProductReviewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reviews.v1.GetProductReviewRequest) + GetProductReviewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "GetProductReviewRequest"); + } + + // Use GetProductReviewRequest.newBuilder() to construct. + private GetProductReviewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private GetProductReviewRequest() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_GetProductReviewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_GetProductReviewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest.class, + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The ID of the merchant review.
+   * Format: accounts/{account}/productReviews/{productReview}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The ID of the merchant review.
+   * Format: accounts/{account}/productReviews/{productReview}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reviews.v1.GetProductReviewRequest)) { + return super.equals(obj); + } + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest other = + (com.google.shopping.merchant.reviews.v1.GetProductReviewRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the GetProductReview method.
+   * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.GetProductReviewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reviews.v1.GetProductReviewRequest) + com.google.shopping.merchant.reviews.v1.GetProductReviewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_GetProductReviewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_GetProductReviewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest.class, + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest.Builder.class); + } + + // Construct using com.google.shopping.merchant.reviews.v1.GetProductReviewRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_GetProductReviewRequest_descriptor; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.GetProductReviewRequest + getDefaultInstanceForType() { + return com.google.shopping.merchant.reviews.v1.GetProductReviewRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.GetProductReviewRequest build() { + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.GetProductReviewRequest buildPartial() { + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest result = + new com.google.shopping.merchant.reviews.v1.GetProductReviewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reviews.v1.GetProductReviewRequest) { + return mergeFrom((com.google.shopping.merchant.reviews.v1.GetProductReviewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.shopping.merchant.reviews.v1.GetProductReviewRequest other) { + if (other + == com.google.shopping.merchant.reviews.v1.GetProductReviewRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Required. The ID of the merchant review.
+     * Format: accounts/{account}/productReviews/{productReview}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The ID of the merchant review.
+     * Format: accounts/{account}/productReviews/{productReview}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The ID of the merchant review.
+     * Format: accounts/{account}/productReviews/{productReview}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the merchant review.
+     * Format: accounts/{account}/productReviews/{productReview}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The ID of the merchant review.
+     * Format: accounts/{account}/productReviews/{productReview}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reviews.v1.GetProductReviewRequest) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reviews.v1.GetProductReviewRequest) + private static final com.google.shopping.merchant.reviews.v1.GetProductReviewRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reviews.v1.GetProductReviewRequest(); + } + + public static com.google.shopping.merchant.reviews.v1.GetProductReviewRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProductReviewRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.GetProductReviewRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/GetProductReviewRequestOrBuilder.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/GetProductReviewRequestOrBuilder.java new file mode 100644 index 000000000000..cc95125ee351 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/GetProductReviewRequestOrBuilder.java @@ -0,0 +1,60 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +@com.google.protobuf.Generated +public interface GetProductReviewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reviews.v1.GetProductReviewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The ID of the merchant review.
+   * Format: accounts/{account}/productReviews/{productReview}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The ID of the merchant review.
+   * Format: accounts/{account}/productReviews/{productReview}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/InsertProductReviewRequest.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/InsertProductReviewRequest.java new file mode 100644 index 000000000000..86585dcf2a68 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/InsertProductReviewRequest.java @@ -0,0 +1,1132 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +/** + * + * + *
+ * Request message for the `InsertProductReview` method.
+ * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.InsertProductReviewRequest} + */ +@com.google.protobuf.Generated +public final class InsertProductReviewRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reviews.v1.InsertProductReviewRequest) + InsertProductReviewRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "InsertProductReviewRequest"); + } + + // Use InsertProductReviewRequest.newBuilder() to construct. + private InsertProductReviewRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private InsertProductReviewRequest() { + parent_ = ""; + dataSource_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_InsertProductReviewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_InsertProductReviewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest.class, + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest.Builder.class); + } + + private int bitField0_; + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The account where the product review will be inserted.
+   * Format: accounts/{account}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The account where the product review will be inserted.
+   * Format: accounts/{account}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_REVIEW_FIELD_NUMBER = 2; + private com.google.shopping.merchant.reviews.v1.ProductReview productReview_; + + /** + * + * + *
+   * Required. The product review to insert.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the productReview field is set. + */ + @java.lang.Override + public boolean hasProductReview() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The product review to insert.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The productReview. + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReview getProductReview() { + return productReview_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReview.getDefaultInstance() + : productReview_; + } + + /** + * + * + *
+   * Required. The product review to insert.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder + getProductReviewOrBuilder() { + return productReview_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReview.getDefaultInstance() + : productReview_; + } + + public static final int DATA_SOURCE_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSource_ = ""; + + /** + * + * + *
+   * Required. Format:
+   * `accounts/{account}/dataSources/{datasource}`.
+   * 
+ * + * string data_source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataSource. + */ + @java.lang.Override + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSource_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. Format:
+   * `accounts/{account}/dataSources/{datasource}`.
+   * 
+ * + * string data_source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataSource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getProductReview()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, dataSource_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProductReview()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, dataSource_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest)) { + return super.equals(obj); + } + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest other = + (com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasProductReview() != other.hasProductReview()) return false; + if (hasProductReview()) { + if (!getProductReview().equals(other.getProductReview())) return false; + } + if (!getDataSource().equals(other.getDataSource())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasProductReview()) { + hash = (37 * hash) + PRODUCT_REVIEW_FIELD_NUMBER; + hash = (53 * hash) + getProductReview().hashCode(); + } + hash = (37 * hash) + DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDataSource().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the `InsertProductReview` method.
+   * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.InsertProductReviewRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reviews.v1.InsertProductReviewRequest) + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_InsertProductReviewRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_InsertProductReviewRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest.class, + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest.Builder.class); + } + + // Construct using + // com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetProductReviewFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + productReview_ = null; + if (productReviewBuilder_ != null) { + productReviewBuilder_.dispose(); + productReviewBuilder_ = null; + } + dataSource_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_InsertProductReviewRequest_descriptor; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest + getDefaultInstanceForType() { + return com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest build() { + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest buildPartial() { + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest result = + new com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.productReview_ = + productReviewBuilder_ == null ? productReview_ : productReviewBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataSource_ = dataSource_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest) { + return mergeFrom( + (com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest other) { + if (other + == com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasProductReview()) { + mergeProductReview(other.getProductReview()); + } + if (!other.getDataSource().isEmpty()) { + dataSource_ = other.dataSource_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + internalGetProductReviewFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + dataSource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The account where the product review will be inserted.
+     * Format: accounts/{account}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The account where the product review will be inserted.
+     * Format: accounts/{account}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The account where the product review will be inserted.
+     * Format: accounts/{account}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The account where the product review will be inserted.
+     * Format: accounts/{account}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The account where the product review will be inserted.
+     * Format: accounts/{account}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.shopping.merchant.reviews.v1.ProductReview productReview_; + private com.google.protobuf.SingleFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReview, + com.google.shopping.merchant.reviews.v1.ProductReview.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder> + productReviewBuilder_; + + /** + * + * + *
+     * Required. The product review to insert.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the productReview field is set. + */ + public boolean hasProductReview() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The product review to insert.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The productReview. + */ + public com.google.shopping.merchant.reviews.v1.ProductReview getProductReview() { + if (productReviewBuilder_ == null) { + return productReview_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReview.getDefaultInstance() + : productReview_; + } else { + return productReviewBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The product review to insert.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProductReview(com.google.shopping.merchant.reviews.v1.ProductReview value) { + if (productReviewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productReview_ = value; + } else { + productReviewBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The product review to insert.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setProductReview( + com.google.shopping.merchant.reviews.v1.ProductReview.Builder builderForValue) { + if (productReviewBuilder_ == null) { + productReview_ = builderForValue.build(); + } else { + productReviewBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The product review to insert.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeProductReview(com.google.shopping.merchant.reviews.v1.ProductReview value) { + if (productReviewBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && productReview_ != null + && productReview_ + != com.google.shopping.merchant.reviews.v1.ProductReview.getDefaultInstance()) { + getProductReviewBuilder().mergeFrom(value); + } else { + productReview_ = value; + } + } else { + productReviewBuilder_.mergeFrom(value); + } + if (productReview_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The product review to insert.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearProductReview() { + bitField0_ = (bitField0_ & ~0x00000002); + productReview_ = null; + if (productReviewBuilder_ != null) { + productReviewBuilder_.dispose(); + productReviewBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The product review to insert.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReview.Builder getProductReviewBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return internalGetProductReviewFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The product review to insert.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder + getProductReviewOrBuilder() { + if (productReviewBuilder_ != null) { + return productReviewBuilder_.getMessageOrBuilder(); + } else { + return productReview_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReview.getDefaultInstance() + : productReview_; + } + } + + /** + * + * + *
+     * Required. The product review to insert.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReview, + com.google.shopping.merchant.reviews.v1.ProductReview.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder> + internalGetProductReviewFieldBuilder() { + if (productReviewBuilder_ == null) { + productReviewBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReview, + com.google.shopping.merchant.reviews.v1.ProductReview.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder>( + getProductReview(), getParentForChildren(), isClean()); + productReview_ = null; + } + return productReviewBuilder_; + } + + private java.lang.Object dataSource_ = ""; + + /** + * + * + *
+     * Required. Format:
+     * `accounts/{account}/dataSources/{datasource}`.
+     * 
+ * + * string data_source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataSource. + */ + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. Format:
+     * `accounts/{account}/dataSources/{datasource}`.
+     * 
+ * + * string data_source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataSource. + */ + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. Format:
+     * `accounts/{account}/dataSources/{datasource}`.
+     * 
+ * + * string data_source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Format:
+     * `accounts/{account}/dataSources/{datasource}`.
+     * 
+ * + * string data_source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDataSource() { + dataSource_ = getDefaultInstance().getDataSource(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Format:
+     * `accounts/{account}/dataSources/{datasource}`.
+     * 
+ * + * string data_source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSource_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reviews.v1.InsertProductReviewRequest) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reviews.v1.InsertProductReviewRequest) + private static final com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest(); + } + + public static com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InsertProductReviewRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/InsertProductReviewRequestOrBuilder.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/InsertProductReviewRequestOrBuilder.java new file mode 100644 index 000000000000..4dc3ef0e86d3 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/InsertProductReviewRequestOrBuilder.java @@ -0,0 +1,127 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +@com.google.protobuf.Generated +public interface InsertProductReviewRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reviews.v1.InsertProductReviewRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The account where the product review will be inserted.
+   * Format: accounts/{account}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The account where the product review will be inserted.
+   * Format: accounts/{account}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The product review to insert.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the productReview field is set. + */ + boolean hasProductReview(); + + /** + * + * + *
+   * Required. The product review to insert.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The productReview. + */ + com.google.shopping.merchant.reviews.v1.ProductReview getProductReview(); + + /** + * + * + *
+   * Required. The product review to insert.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReview product_review = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder getProductReviewOrBuilder(); + + /** + * + * + *
+   * Required. Format:
+   * `accounts/{account}/dataSources/{datasource}`.
+   * 
+ * + * string data_source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataSource. + */ + java.lang.String getDataSource(); + + /** + * + * + *
+   * Required. Format:
+   * `accounts/{account}/dataSources/{datasource}`.
+   * 
+ * + * string data_source = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataSource. + */ + com.google.protobuf.ByteString getDataSourceBytes(); +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ListProductReviewsRequest.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ListProductReviewsRequest.java new file mode 100644 index 000000000000..992ee372a223 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ListProductReviewsRequest.java @@ -0,0 +1,945 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +/** + * + * + *
+ * Request message for the ListProductReviews method.
+ * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.ListProductReviewsRequest} + */ +@com.google.protobuf.Generated +public final class ListProductReviewsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reviews.v1.ListProductReviewsRequest) + ListProductReviewsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListProductReviewsRequest"); + } + + // Use ListProductReviewsRequest.newBuilder() to construct. + private ListProductReviewsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListProductReviewsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest.class, + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The account to list product reviews for.
+   * Format: accounts/{account}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The account to list product reviews for.
+   * Format: accounts/{account}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Optional. The maximum number of products to return. The service may return
+   * fewer than this value.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListProductReviews` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListProductReviews`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListProductReviews` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListProductReviews`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest)) { + return super.equals(obj); + } + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest other = + (com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Request message for the ListProductReviews method.
+   * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.ListProductReviewsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reviews.v1.ListProductReviewsRequest) + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest.class, + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest.Builder.class); + } + + // Construct using + // com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsRequest_descriptor; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest + getDefaultInstanceForType() { + return com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest build() { + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest buildPartial() { + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest result = + new com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest) { + return mergeFrom((com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest other) { + if (other + == com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The account to list product reviews for.
+     * Format: accounts/{account}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The account to list product reviews for.
+     * Format: accounts/{account}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The account to list product reviews for.
+     * Format: accounts/{account}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The account to list product reviews for.
+     * Format: accounts/{account}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The account to list product reviews for.
+     * Format: accounts/{account}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * Optional. The maximum number of products to return. The service may return
+     * fewer than this value.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Optional. The maximum number of products to return. The service may return
+     * fewer than this value.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum number of products to return. The service may return
+     * fewer than this value.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListProductReviews` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListProductReviews`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListProductReviews` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListProductReviews`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListProductReviews` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListProductReviews`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListProductReviews` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListProductReviews`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A page token, received from a previous `ListProductReviews` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListProductReviews`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reviews.v1.ListProductReviewsRequest) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reviews.v1.ListProductReviewsRequest) + private static final com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest(); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductReviewsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ListProductReviewsRequestOrBuilder.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ListProductReviewsRequestOrBuilder.java new file mode 100644 index 000000000000..4da505ff72eb --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ListProductReviewsRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +@com.google.protobuf.Generated +public interface ListProductReviewsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reviews.v1.ListProductReviewsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The account to list product reviews for.
+   * Format: accounts/{account}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The account to list product reviews for.
+   * Format: accounts/{account}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of products to return. The service may return
+   * fewer than this value.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListProductReviews` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListProductReviews`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListProductReviews` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListProductReviews`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ListProductReviewsResponse.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ListProductReviewsResponse.java new file mode 100644 index 000000000000..eef980e6dace --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ListProductReviewsResponse.java @@ -0,0 +1,1148 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +/** + * + * + *
+ * response message for the ListProductReviews method.
+ * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.ListProductReviewsResponse} + */ +@com.google.protobuf.Generated +public final class ListProductReviewsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reviews.v1.ListProductReviewsResponse) + ListProductReviewsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ListProductReviewsResponse"); + } + + // Use ListProductReviewsResponse.newBuilder() to construct. + private ListProductReviewsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListProductReviewsResponse() { + productReviews_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse.class, + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse.Builder.class); + } + + public static final int PRODUCT_REVIEWS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List productReviews_; + + /** + * + * + *
+   * The product review.
+   * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + @java.lang.Override + public java.util.List + getProductReviewsList() { + return productReviews_; + } + + /** + * + * + *
+   * The product review.
+   * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + @java.lang.Override + public java.util.List + getProductReviewsOrBuilderList() { + return productReviews_; + } + + /** + * + * + *
+   * The product review.
+   * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + @java.lang.Override + public int getProductReviewsCount() { + return productReviews_.size(); + } + + /** + * + * + *
+   * The product review.
+   * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReview getProductReviews(int index) { + return productReviews_.get(index); + } + + /** + * + * + *
+   * The product review.
+   * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder getProductReviewsOrBuilder( + int index) { + return productReviews_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < productReviews_.size(); i++) { + output.writeMessage(1, productReviews_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < productReviews_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, productReviews_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse)) { + return super.equals(obj); + } + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse other = + (com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse) obj; + + if (!getProductReviewsList().equals(other.getProductReviewsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getProductReviewsCount() > 0) { + hash = (37 * hash) + PRODUCT_REVIEWS_FIELD_NUMBER; + hash = (53 * hash) + getProductReviewsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * response message for the ListProductReviews method.
+   * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.ListProductReviewsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reviews.v1.ListProductReviewsResponse) + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse.class, + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse.Builder.class); + } + + // Construct using + // com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (productReviewsBuilder_ == null) { + productReviews_ = java.util.Collections.emptyList(); + } else { + productReviews_ = null; + productReviewsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsResponse_descriptor; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse + getDefaultInstanceForType() { + return com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse build() { + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse buildPartial() { + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse result = + new com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse result) { + if (productReviewsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + productReviews_ = java.util.Collections.unmodifiableList(productReviews_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.productReviews_ = productReviews_; + } else { + result.productReviews_ = productReviewsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse) { + return mergeFrom( + (com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse other) { + if (other + == com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse + .getDefaultInstance()) return this; + if (productReviewsBuilder_ == null) { + if (!other.productReviews_.isEmpty()) { + if (productReviews_.isEmpty()) { + productReviews_ = other.productReviews_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductReviewsIsMutable(); + productReviews_.addAll(other.productReviews_); + } + onChanged(); + } + } else { + if (!other.productReviews_.isEmpty()) { + if (productReviewsBuilder_.isEmpty()) { + productReviewsBuilder_.dispose(); + productReviewsBuilder_ = null; + productReviews_ = other.productReviews_; + bitField0_ = (bitField0_ & ~0x00000001); + productReviewsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetProductReviewsFieldBuilder() + : null; + } else { + productReviewsBuilder_.addAllMessages(other.productReviews_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.shopping.merchant.reviews.v1.ProductReview m = + input.readMessage( + com.google.shopping.merchant.reviews.v1.ProductReview.parser(), + extensionRegistry); + if (productReviewsBuilder_ == null) { + ensureProductReviewsIsMutable(); + productReviews_.add(m); + } else { + productReviewsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List productReviews_ = + java.util.Collections.emptyList(); + + private void ensureProductReviewsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + productReviews_ = + new java.util.ArrayList( + productReviews_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReview, + com.google.shopping.merchant.reviews.v1.ProductReview.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder> + productReviewsBuilder_; + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public java.util.List + getProductReviewsList() { + if (productReviewsBuilder_ == null) { + return java.util.Collections.unmodifiableList(productReviews_); + } else { + return productReviewsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public int getProductReviewsCount() { + if (productReviewsBuilder_ == null) { + return productReviews_.size(); + } else { + return productReviewsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public com.google.shopping.merchant.reviews.v1.ProductReview getProductReviews(int index) { + if (productReviewsBuilder_ == null) { + return productReviews_.get(index); + } else { + return productReviewsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public Builder setProductReviews( + int index, com.google.shopping.merchant.reviews.v1.ProductReview value) { + if (productReviewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductReviewsIsMutable(); + productReviews_.set(index, value); + onChanged(); + } else { + productReviewsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public Builder setProductReviews( + int index, com.google.shopping.merchant.reviews.v1.ProductReview.Builder builderForValue) { + if (productReviewsBuilder_ == null) { + ensureProductReviewsIsMutable(); + productReviews_.set(index, builderForValue.build()); + onChanged(); + } else { + productReviewsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public Builder addProductReviews(com.google.shopping.merchant.reviews.v1.ProductReview value) { + if (productReviewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductReviewsIsMutable(); + productReviews_.add(value); + onChanged(); + } else { + productReviewsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public Builder addProductReviews( + int index, com.google.shopping.merchant.reviews.v1.ProductReview value) { + if (productReviewsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductReviewsIsMutable(); + productReviews_.add(index, value); + onChanged(); + } else { + productReviewsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public Builder addProductReviews( + com.google.shopping.merchant.reviews.v1.ProductReview.Builder builderForValue) { + if (productReviewsBuilder_ == null) { + ensureProductReviewsIsMutable(); + productReviews_.add(builderForValue.build()); + onChanged(); + } else { + productReviewsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public Builder addProductReviews( + int index, com.google.shopping.merchant.reviews.v1.ProductReview.Builder builderForValue) { + if (productReviewsBuilder_ == null) { + ensureProductReviewsIsMutable(); + productReviews_.add(index, builderForValue.build()); + onChanged(); + } else { + productReviewsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public Builder addAllProductReviews( + java.lang.Iterable + values) { + if (productReviewsBuilder_ == null) { + ensureProductReviewsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, productReviews_); + onChanged(); + } else { + productReviewsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public Builder clearProductReviews() { + if (productReviewsBuilder_ == null) { + productReviews_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productReviewsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public Builder removeProductReviews(int index) { + if (productReviewsBuilder_ == null) { + ensureProductReviewsIsMutable(); + productReviews_.remove(index); + onChanged(); + } else { + productReviewsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public com.google.shopping.merchant.reviews.v1.ProductReview.Builder getProductReviewsBuilder( + int index) { + return internalGetProductReviewsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder + getProductReviewsOrBuilder(int index) { + if (productReviewsBuilder_ == null) { + return productReviews_.get(index); + } else { + return productReviewsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public java.util.List + getProductReviewsOrBuilderList() { + if (productReviewsBuilder_ != null) { + return productReviewsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(productReviews_); + } + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public com.google.shopping.merchant.reviews.v1.ProductReview.Builder + addProductReviewsBuilder() { + return internalGetProductReviewsFieldBuilder() + .addBuilder(com.google.shopping.merchant.reviews.v1.ProductReview.getDefaultInstance()); + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public com.google.shopping.merchant.reviews.v1.ProductReview.Builder addProductReviewsBuilder( + int index) { + return internalGetProductReviewsFieldBuilder() + .addBuilder( + index, com.google.shopping.merchant.reviews.v1.ProductReview.getDefaultInstance()); + } + + /** + * + * + *
+     * The product review.
+     * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + public java.util.List + getProductReviewsBuilderList() { + return internalGetProductReviewsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReview, + com.google.shopping.merchant.reviews.v1.ProductReview.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder> + internalGetProductReviewsFieldBuilder() { + if (productReviewsBuilder_ == null) { + productReviewsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReview, + com.google.shopping.merchant.reviews.v1.ProductReview.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder>( + productReviews_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + productReviews_ = null; + } + return productReviewsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reviews.v1.ListProductReviewsResponse) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reviews.v1.ListProductReviewsResponse) + private static final com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse(); + } + + public static com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductReviewsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ListProductReviewsResponseOrBuilder.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ListProductReviewsResponseOrBuilder.java new file mode 100644 index 000000000000..ff3d3ad35936 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ListProductReviewsResponseOrBuilder.java @@ -0,0 +1,113 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +@com.google.protobuf.Generated +public interface ListProductReviewsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reviews.v1.ListProductReviewsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The product review.
+   * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + java.util.List getProductReviewsList(); + + /** + * + * + *
+   * The product review.
+   * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + com.google.shopping.merchant.reviews.v1.ProductReview getProductReviews(int index); + + /** + * + * + *
+   * The product review.
+   * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + int getProductReviewsCount(); + + /** + * + * + *
+   * The product review.
+   * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + java.util.List + getProductReviewsOrBuilderList(); + + /** + * + * + *
+   * The product review.
+   * 
+ * + * repeated .google.shopping.merchant.reviews.v1.ProductReview product_reviews = 1; + */ + com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder getProductReviewsOrBuilder( + int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReview.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReview.java new file mode 100644 index 000000000000..754b5c887a17 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReview.java @@ -0,0 +1,2228 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +/** + * + * + *
+ * A review for a product. For more information, see
+ * [Introduction to Product Review
+ * Feeds](https://developers.google.com/product-review-feeds)
+ * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.ProductReview} + */ +@com.google.protobuf.Generated +public final class ProductReview extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reviews.v1.ProductReview) + ProductReviewOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ProductReview"); + } + + // Use ProductReview.newBuilder() to construct. + private ProductReview(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ProductReview() { + name_ = ""; + productReviewId_ = ""; + customAttributes_ = java.util.Collections.emptyList(); + dataSource_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReview_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReview_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ProductReview.class, + com.google.shopping.merchant.reviews.v1.ProductReview.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The name of the product review.
+   * Format:
+   * `"{productreview.name=accounts/{account}/productReviews/{productReview}}"`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + + /** + * + * + *
+   * Identifier. The name of the product review.
+   * Format:
+   * `"{productreview.name=accounts/{account}/productReviews/{productReview}}"`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_REVIEW_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object productReviewId_ = ""; + + /** + * + * + *
+   * Required. The permanent, unique identifier for the product review in the
+   * publisher’s system.
+   * 
+ * + * string product_review_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The productReviewId. + */ + @java.lang.Override + public java.lang.String getProductReviewId() { + java.lang.Object ref = productReviewId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productReviewId_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The permanent, unique identifier for the product review in the
+   * publisher’s system.
+   * 
+ * + * string product_review_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for productReviewId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProductReviewIdBytes() { + java.lang.Object ref = productReviewId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + productReviewId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_REVIEW_ATTRIBUTES_FIELD_NUMBER = 3; + private com.google.shopping.merchant.reviews.v1.ProductReviewAttributes productReviewAttributes_; + + /** + * + * + *
+   * Optional. A list of product review attributes.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the productReviewAttributes field is set. + */ + @java.lang.Override + public boolean hasProductReviewAttributes() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. A list of product review attributes.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The productReviewAttributes. + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes + getProductReviewAttributes() { + return productReviewAttributes_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.getDefaultInstance() + : productReviewAttributes_; + } + + /** + * + * + *
+   * Optional. A list of product review attributes.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributesOrBuilder + getProductReviewAttributesOrBuilder() { + return productReviewAttributes_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.getDefaultInstance() + : productReviewAttributes_; + } + + public static final int CUSTOM_ATTRIBUTES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List customAttributes_; + + /** + * + * + *
+   * Optional. A list of custom (merchant-provided) attributes.
+   * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getCustomAttributesList() { + return customAttributes_; + } + + /** + * + * + *
+   * Optional. A list of custom (merchant-provided) attributes.
+   * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getCustomAttributesOrBuilderList() { + return customAttributes_; + } + + /** + * + * + *
+   * Optional. A list of custom (merchant-provided) attributes.
+   * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getCustomAttributesCount() { + return customAttributes_.size(); + } + + /** + * + * + *
+   * Optional. A list of custom (merchant-provided) attributes.
+   * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.shopping.type.CustomAttribute getCustomAttributes(int index) { + return customAttributes_.get(index); + } + + /** + * + * + *
+   * Optional. A list of custom (merchant-provided) attributes.
+   * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.shopping.type.CustomAttributeOrBuilder getCustomAttributesOrBuilder(int index) { + return customAttributes_.get(index); + } + + public static final int DATA_SOURCE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSource_ = ""; + + /** + * + * + *
+   * Output only. The primary data source of the product review.
+   * 
+ * + * string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dataSource. + */ + @java.lang.Override + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSource_ = s; + return s; + } + } + + /** + * + * + *
+   * Output only. The primary data source of the product review.
+   * 
+ * + * string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for dataSource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_REVIEW_STATUS_FIELD_NUMBER = 6; + private com.google.shopping.merchant.reviews.v1.ProductReviewStatus productReviewStatus_; + + /** + * + * + *
+   * Output only. The status of a product review, data validation issues, that
+   * is, information about a product review computed asynchronously.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the productReviewStatus field is set. + */ + @java.lang.Override + public boolean hasProductReviewStatus() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The status of a product review, data validation issues, that
+   * is, information about a product review computed asynchronously.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The productReviewStatus. + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus getProductReviewStatus() { + return productReviewStatus_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewStatus.getDefaultInstance() + : productReviewStatus_; + } + + /** + * + * + *
+   * Output only. The status of a product review, data validation issues, that
+   * is, information about a product review computed asynchronously.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatusOrBuilder + getProductReviewStatusOrBuilder() { + return productReviewStatus_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewStatus.getDefaultInstance() + : productReviewStatus_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(productReviewId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, productReviewId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getProductReviewAttributes()); + } + for (int i = 0; i < customAttributes_.size(); i++) { + output.writeMessage(4, customAttributes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSource_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, dataSource_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getProductReviewStatus()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(productReviewId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, productReviewId_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProductReviewAttributes()); + } + for (int i = 0; i < customAttributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, customAttributes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(dataSource_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, dataSource_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getProductReviewStatus()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reviews.v1.ProductReview)) { + return super.equals(obj); + } + com.google.shopping.merchant.reviews.v1.ProductReview other = + (com.google.shopping.merchant.reviews.v1.ProductReview) obj; + + if (!getName().equals(other.getName())) return false; + if (!getProductReviewId().equals(other.getProductReviewId())) return false; + if (hasProductReviewAttributes() != other.hasProductReviewAttributes()) return false; + if (hasProductReviewAttributes()) { + if (!getProductReviewAttributes().equals(other.getProductReviewAttributes())) return false; + } + if (!getCustomAttributesList().equals(other.getCustomAttributesList())) return false; + if (!getDataSource().equals(other.getDataSource())) return false; + if (hasProductReviewStatus() != other.hasProductReviewStatus()) return false; + if (hasProductReviewStatus()) { + if (!getProductReviewStatus().equals(other.getProductReviewStatus())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PRODUCT_REVIEW_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductReviewId().hashCode(); + if (hasProductReviewAttributes()) { + hash = (37 * hash) + PRODUCT_REVIEW_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getProductReviewAttributes().hashCode(); + } + if (getCustomAttributesCount() > 0) { + hash = (37 * hash) + CUSTOM_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getCustomAttributesList().hashCode(); + } + hash = (37 * hash) + DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDataSource().hashCode(); + if (hasProductReviewStatus()) { + hash = (37 * hash) + PRODUCT_REVIEW_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getProductReviewStatus().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reviews.v1.ProductReview prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * A review for a product. For more information, see
+   * [Introduction to Product Review
+   * Feeds](https://developers.google.com/product-review-feeds)
+   * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.ProductReview} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reviews.v1.ProductReview) + com.google.shopping.merchant.reviews.v1.ProductReviewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReview_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReview_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ProductReview.class, + com.google.shopping.merchant.reviews.v1.ProductReview.Builder.class); + } + + // Construct using com.google.shopping.merchant.reviews.v1.ProductReview.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetProductReviewAttributesFieldBuilder(); + internalGetCustomAttributesFieldBuilder(); + internalGetProductReviewStatusFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + productReviewId_ = ""; + productReviewAttributes_ = null; + if (productReviewAttributesBuilder_ != null) { + productReviewAttributesBuilder_.dispose(); + productReviewAttributesBuilder_ = null; + } + if (customAttributesBuilder_ == null) { + customAttributes_ = java.util.Collections.emptyList(); + } else { + customAttributes_ = null; + customAttributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + dataSource_ = ""; + productReviewStatus_ = null; + if (productReviewStatusBuilder_ != null) { + productReviewStatusBuilder_.dispose(); + productReviewStatusBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReview_descriptor; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReview getDefaultInstanceForType() { + return com.google.shopping.merchant.reviews.v1.ProductReview.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReview build() { + com.google.shopping.merchant.reviews.v1.ProductReview result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReview buildPartial() { + com.google.shopping.merchant.reviews.v1.ProductReview result = + new com.google.shopping.merchant.reviews.v1.ProductReview(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.shopping.merchant.reviews.v1.ProductReview result) { + if (customAttributesBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + customAttributes_ = java.util.Collections.unmodifiableList(customAttributes_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.customAttributes_ = customAttributes_; + } else { + result.customAttributes_ = customAttributesBuilder_.build(); + } + } + + private void buildPartial0(com.google.shopping.merchant.reviews.v1.ProductReview result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.productReviewId_ = productReviewId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.productReviewAttributes_ = + productReviewAttributesBuilder_ == null + ? productReviewAttributes_ + : productReviewAttributesBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.dataSource_ = dataSource_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.productReviewStatus_ = + productReviewStatusBuilder_ == null + ? productReviewStatus_ + : productReviewStatusBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reviews.v1.ProductReview) { + return mergeFrom((com.google.shopping.merchant.reviews.v1.ProductReview) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.shopping.merchant.reviews.v1.ProductReview other) { + if (other == com.google.shopping.merchant.reviews.v1.ProductReview.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getProductReviewId().isEmpty()) { + productReviewId_ = other.productReviewId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasProductReviewAttributes()) { + mergeProductReviewAttributes(other.getProductReviewAttributes()); + } + if (customAttributesBuilder_ == null) { + if (!other.customAttributes_.isEmpty()) { + if (customAttributes_.isEmpty()) { + customAttributes_ = other.customAttributes_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureCustomAttributesIsMutable(); + customAttributes_.addAll(other.customAttributes_); + } + onChanged(); + } + } else { + if (!other.customAttributes_.isEmpty()) { + if (customAttributesBuilder_.isEmpty()) { + customAttributesBuilder_.dispose(); + customAttributesBuilder_ = null; + customAttributes_ = other.customAttributes_; + bitField0_ = (bitField0_ & ~0x00000008); + customAttributesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetCustomAttributesFieldBuilder() + : null; + } else { + customAttributesBuilder_.addAllMessages(other.customAttributes_); + } + } + } + if (!other.getDataSource().isEmpty()) { + dataSource_ = other.dataSource_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasProductReviewStatus()) { + mergeProductReviewStatus(other.getProductReviewStatus()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + productReviewId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetProductReviewAttributesFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + com.google.shopping.type.CustomAttribute m = + input.readMessage( + com.google.shopping.type.CustomAttribute.parser(), extensionRegistry); + if (customAttributesBuilder_ == null) { + ensureCustomAttributesIsMutable(); + customAttributes_.add(m); + } else { + customAttributesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + dataSource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetProductReviewStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Identifier. The name of the product review.
+     * Format:
+     * `"{productreview.name=accounts/{account}/productReviews/{productReview}}"`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the product review.
+     * Format:
+     * `"{productreview.name=accounts/{account}/productReviews/{productReview}}"`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Identifier. The name of the product review.
+     * Format:
+     * `"{productreview.name=accounts/{account}/productReviews/{productReview}}"`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the product review.
+     * Format:
+     * `"{productreview.name=accounts/{account}/productReviews/{productReview}}"`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the product review.
+     * Format:
+     * `"{productreview.name=accounts/{account}/productReviews/{productReview}}"`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object productReviewId_ = ""; + + /** + * + * + *
+     * Required. The permanent, unique identifier for the product review in the
+     * publisher’s system.
+     * 
+ * + * string product_review_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The productReviewId. + */ + public java.lang.String getProductReviewId() { + java.lang.Object ref = productReviewId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productReviewId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The permanent, unique identifier for the product review in the
+     * publisher’s system.
+     * 
+ * + * string product_review_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for productReviewId. + */ + public com.google.protobuf.ByteString getProductReviewIdBytes() { + java.lang.Object ref = productReviewId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + productReviewId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The permanent, unique identifier for the product review in the
+     * publisher’s system.
+     * 
+ * + * string product_review_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The productReviewId to set. + * @return This builder for chaining. + */ + public Builder setProductReviewId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + productReviewId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The permanent, unique identifier for the product review in the
+     * publisher’s system.
+     * 
+ * + * string product_review_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProductReviewId() { + productReviewId_ = getDefaultInstance().getProductReviewId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The permanent, unique identifier for the product review in the
+     * publisher’s system.
+     * 
+ * + * string product_review_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for productReviewId to set. + * @return This builder for chaining. + */ + public Builder setProductReviewIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + productReviewId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.shopping.merchant.reviews.v1.ProductReviewAttributes + productReviewAttributes_; + private com.google.protobuf.SingleFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributesOrBuilder> + productReviewAttributesBuilder_; + + /** + * + * + *
+     * Optional. A list of product review attributes.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the productReviewAttributes field is set. + */ + public boolean hasProductReviewAttributes() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. A list of product review attributes.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The productReviewAttributes. + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes + getProductReviewAttributes() { + if (productReviewAttributesBuilder_ == null) { + return productReviewAttributes_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.getDefaultInstance() + : productReviewAttributes_; + } else { + return productReviewAttributesBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. A list of product review attributes.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProductReviewAttributes( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes value) { + if (productReviewAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productReviewAttributes_ = value; + } else { + productReviewAttributesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of product review attributes.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setProductReviewAttributes( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.Builder builderForValue) { + if (productReviewAttributesBuilder_ == null) { + productReviewAttributes_ = builderForValue.build(); + } else { + productReviewAttributesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of product review attributes.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeProductReviewAttributes( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes value) { + if (productReviewAttributesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && productReviewAttributes_ != null + && productReviewAttributes_ + != com.google.shopping.merchant.reviews.v1.ProductReviewAttributes + .getDefaultInstance()) { + getProductReviewAttributesBuilder().mergeFrom(value); + } else { + productReviewAttributes_ = value; + } + } else { + productReviewAttributesBuilder_.mergeFrom(value); + } + if (productReviewAttributes_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of product review attributes.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearProductReviewAttributes() { + bitField0_ = (bitField0_ & ~0x00000004); + productReviewAttributes_ = null; + if (productReviewAttributesBuilder_ != null) { + productReviewAttributesBuilder_.dispose(); + productReviewAttributesBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A list of product review attributes.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.Builder + getProductReviewAttributesBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetProductReviewAttributesFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. A list of product review attributes.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributesOrBuilder + getProductReviewAttributesOrBuilder() { + if (productReviewAttributesBuilder_ != null) { + return productReviewAttributesBuilder_.getMessageOrBuilder(); + } else { + return productReviewAttributes_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.getDefaultInstance() + : productReviewAttributes_; + } + } + + /** + * + * + *
+     * Optional. A list of product review attributes.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributesOrBuilder> + internalGetProductReviewAttributesFieldBuilder() { + if (productReviewAttributesBuilder_ == null) { + productReviewAttributesBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributesOrBuilder>( + getProductReviewAttributes(), getParentForChildren(), isClean()); + productReviewAttributes_ = null; + } + return productReviewAttributesBuilder_; + } + + private java.util.List customAttributes_ = + java.util.Collections.emptyList(); + + private void ensureCustomAttributesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + customAttributes_ = + new java.util.ArrayList(customAttributes_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.shopping.type.CustomAttribute, + com.google.shopping.type.CustomAttribute.Builder, + com.google.shopping.type.CustomAttributeOrBuilder> + customAttributesBuilder_; + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getCustomAttributesList() { + if (customAttributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(customAttributes_); + } else { + return customAttributesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getCustomAttributesCount() { + if (customAttributesBuilder_ == null) { + return customAttributes_.size(); + } else { + return customAttributesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.shopping.type.CustomAttribute getCustomAttributes(int index) { + if (customAttributesBuilder_ == null) { + return customAttributes_.get(index); + } else { + return customAttributesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCustomAttributes(int index, com.google.shopping.type.CustomAttribute value) { + if (customAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomAttributesIsMutable(); + customAttributes_.set(index, value); + onChanged(); + } else { + customAttributesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setCustomAttributes( + int index, com.google.shopping.type.CustomAttribute.Builder builderForValue) { + if (customAttributesBuilder_ == null) { + ensureCustomAttributesIsMutable(); + customAttributes_.set(index, builderForValue.build()); + onChanged(); + } else { + customAttributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCustomAttributes(com.google.shopping.type.CustomAttribute value) { + if (customAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomAttributesIsMutable(); + customAttributes_.add(value); + onChanged(); + } else { + customAttributesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCustomAttributes(int index, com.google.shopping.type.CustomAttribute value) { + if (customAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomAttributesIsMutable(); + customAttributes_.add(index, value); + onChanged(); + } else { + customAttributesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCustomAttributes( + com.google.shopping.type.CustomAttribute.Builder builderForValue) { + if (customAttributesBuilder_ == null) { + ensureCustomAttributesIsMutable(); + customAttributes_.add(builderForValue.build()); + onChanged(); + } else { + customAttributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addCustomAttributes( + int index, com.google.shopping.type.CustomAttribute.Builder builderForValue) { + if (customAttributesBuilder_ == null) { + ensureCustomAttributesIsMutable(); + customAttributes_.add(index, builderForValue.build()); + onChanged(); + } else { + customAttributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllCustomAttributes( + java.lang.Iterable values) { + if (customAttributesBuilder_ == null) { + ensureCustomAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, customAttributes_); + onChanged(); + } else { + customAttributesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearCustomAttributes() { + if (customAttributesBuilder_ == null) { + customAttributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + customAttributesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeCustomAttributes(int index) { + if (customAttributesBuilder_ == null) { + ensureCustomAttributesIsMutable(); + customAttributes_.remove(index); + onChanged(); + } else { + customAttributesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.shopping.type.CustomAttribute.Builder getCustomAttributesBuilder(int index) { + return internalGetCustomAttributesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.shopping.type.CustomAttributeOrBuilder getCustomAttributesOrBuilder( + int index) { + if (customAttributesBuilder_ == null) { + return customAttributes_.get(index); + } else { + return customAttributesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getCustomAttributesOrBuilderList() { + if (customAttributesBuilder_ != null) { + return customAttributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(customAttributes_); + } + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.shopping.type.CustomAttribute.Builder addCustomAttributesBuilder() { + return internalGetCustomAttributesFieldBuilder() + .addBuilder(com.google.shopping.type.CustomAttribute.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.shopping.type.CustomAttribute.Builder addCustomAttributesBuilder(int index) { + return internalGetCustomAttributesFieldBuilder() + .addBuilder(index, com.google.shopping.type.CustomAttribute.getDefaultInstance()); + } + + /** + * + * + *
+     * Optional. A list of custom (merchant-provided) attributes.
+     * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getCustomAttributesBuilderList() { + return internalGetCustomAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.shopping.type.CustomAttribute, + com.google.shopping.type.CustomAttribute.Builder, + com.google.shopping.type.CustomAttributeOrBuilder> + internalGetCustomAttributesFieldBuilder() { + if (customAttributesBuilder_ == null) { + customAttributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.shopping.type.CustomAttribute, + com.google.shopping.type.CustomAttribute.Builder, + com.google.shopping.type.CustomAttributeOrBuilder>( + customAttributes_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + customAttributes_ = null; + } + return customAttributesBuilder_; + } + + private java.lang.Object dataSource_ = ""; + + /** + * + * + *
+     * Output only. The primary data source of the product review.
+     * 
+ * + * string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dataSource. + */ + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The primary data source of the product review.
+     * 
+ * + * string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for dataSource. + */ + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The primary data source of the product review.
+     * 
+ * + * string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The primary data source of the product review.
+     * 
+ * + * string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDataSource() { + dataSource_ = getDefaultInstance().getDataSource(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The primary data source of the product review.
+     * 
+ * + * string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSource_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.shopping.merchant.reviews.v1.ProductReviewStatus productReviewStatus_; + private com.google.protobuf.SingleFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewStatusOrBuilder> + productReviewStatusBuilder_; + + /** + * + * + *
+     * Output only. The status of a product review, data validation issues, that
+     * is, information about a product review computed asynchronously.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the productReviewStatus field is set. + */ + public boolean hasProductReviewStatus() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Output only. The status of a product review, data validation issues, that
+     * is, information about a product review computed asynchronously.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The productReviewStatus. + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus getProductReviewStatus() { + if (productReviewStatusBuilder_ == null) { + return productReviewStatus_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewStatus.getDefaultInstance() + : productReviewStatus_; + } else { + return productReviewStatusBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The status of a product review, data validation issues, that
+     * is, information about a product review computed asynchronously.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProductReviewStatus( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus value) { + if (productReviewStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + productReviewStatus_ = value; + } else { + productReviewStatusBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The status of a product review, data validation issues, that
+     * is, information about a product review computed asynchronously.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProductReviewStatus( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.Builder builderForValue) { + if (productReviewStatusBuilder_ == null) { + productReviewStatus_ = builderForValue.build(); + } else { + productReviewStatusBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The status of a product review, data validation issues, that
+     * is, information about a product review computed asynchronously.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeProductReviewStatus( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus value) { + if (productReviewStatusBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && productReviewStatus_ != null + && productReviewStatus_ + != com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .getDefaultInstance()) { + getProductReviewStatusBuilder().mergeFrom(value); + } else { + productReviewStatus_ = value; + } + } else { + productReviewStatusBuilder_.mergeFrom(value); + } + if (productReviewStatus_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The status of a product review, data validation issues, that
+     * is, information about a product review computed asynchronously.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearProductReviewStatus() { + bitField0_ = (bitField0_ & ~0x00000020); + productReviewStatus_ = null; + if (productReviewStatusBuilder_ != null) { + productReviewStatusBuilder_.dispose(); + productReviewStatusBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The status of a product review, data validation issues, that
+     * is, information about a product review computed asynchronously.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.Builder + getProductReviewStatusBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return internalGetProductReviewStatusFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The status of a product review, data validation issues, that
+     * is, information about a product review computed asynchronously.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatusOrBuilder + getProductReviewStatusOrBuilder() { + if (productReviewStatusBuilder_ != null) { + return productReviewStatusBuilder_.getMessageOrBuilder(); + } else { + return productReviewStatus_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewStatus.getDefaultInstance() + : productReviewStatus_; + } + } + + /** + * + * + *
+     * Output only. The status of a product review, data validation issues, that
+     * is, information about a product review computed asynchronously.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewStatusOrBuilder> + internalGetProductReviewStatusFieldBuilder() { + if (productReviewStatusBuilder_ == null) { + productReviewStatusBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewStatusOrBuilder>( + getProductReviewStatus(), getParentForChildren(), isClean()); + productReviewStatus_ = null; + } + return productReviewStatusBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reviews.v1.ProductReview) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reviews.v1.ProductReview) + private static final com.google.shopping.merchant.reviews.v1.ProductReview DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reviews.v1.ProductReview(); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReview getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductReview parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReview getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewAttributes.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewAttributes.java new file mode 100644 index 000000000000..8b8b1536fe1f --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewAttributes.java @@ -0,0 +1,9079 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews_common.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +/** + * + * + *
+ * Attributes.
+ * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.ProductReviewAttributes} + */ +@com.google.protobuf.Generated +public final class ProductReviewAttributes extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reviews.v1.ProductReviewAttributes) + ProductReviewAttributesOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ProductReviewAttributes"); + } + + // Use ProductReviewAttributes.newBuilder() to construct. + private ProductReviewAttributes(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ProductReviewAttributes() { + aggregatorName_ = ""; + subclientName_ = ""; + publisherName_ = ""; + publisherFavicon_ = ""; + reviewerId_ = ""; + reviewerUsername_ = ""; + reviewLanguage_ = ""; + reviewCountry_ = ""; + title_ = ""; + content_ = ""; + pros_ = com.google.protobuf.LazyStringArrayList.emptyList(); + cons_ = com.google.protobuf.LazyStringArrayList.emptyList(); + reviewerImageLinks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + productNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + productLinks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + asins_ = com.google.protobuf.LazyStringArrayList.emptyList(); + gtins_ = com.google.protobuf.LazyStringArrayList.emptyList(); + mpns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + skus_ = com.google.protobuf.LazyStringArrayList.emptyList(); + brands_ = com.google.protobuf.LazyStringArrayList.emptyList(); + collectionMethod_ = 0; + transactionId_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.class, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.Builder.class); + } + + /** + * + * + *
+   * The method used to collect the review.
+   * 
+ * + * Protobuf enum {@code + * google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod} + */ + public enum CollectionMethod implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Collection method unspecified.
+     * 
+ * + * COLLECTION_METHOD_UNSPECIFIED = 0; + */ + COLLECTION_METHOD_UNSPECIFIED(0), + /** + * + * + *
+     * The user was not responding to a specific solicitation when they
+     * submitted the review.
+     * 
+ * + * UNSOLICITED = 1; + */ + UNSOLICITED(1), + /** + * + * + *
+     * The user submitted the review in response to a solicitation after
+     * fulfillment of the user's order.
+     * 
+ * + * POST_FULFILLMENT = 2; + */ + POST_FULFILLMENT(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "CollectionMethod"); + } + + /** + * + * + *
+     * Collection method unspecified.
+     * 
+ * + * COLLECTION_METHOD_UNSPECIFIED = 0; + */ + public static final int COLLECTION_METHOD_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The user was not responding to a specific solicitation when they
+     * submitted the review.
+     * 
+ * + * UNSOLICITED = 1; + */ + public static final int UNSOLICITED_VALUE = 1; + + /** + * + * + *
+     * The user submitted the review in response to a solicitation after
+     * fulfillment of the user's order.
+     * 
+ * + * POST_FULFILLMENT = 2; + */ + public static final int POST_FULFILLMENT_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CollectionMethod valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static CollectionMethod forNumber(int value) { + switch (value) { + case 0: + return COLLECTION_METHOD_UNSPECIFIED; + case 1: + return UNSOLICITED; + case 2: + return POST_FULFILLMENT; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public CollectionMethod findValueByNumber(int number) { + return CollectionMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final CollectionMethod[] VALUES = values(); + + public static CollectionMethod valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private CollectionMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod) + } + + public interface ReviewLinkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. Type of the review URI.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + + /** + * + * + *
+     * Optional. Type of the review URI.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type getType(); + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * For example: `http://www.example.com/review_5.html`.
+     * 
+ * + * string link = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The link. + */ + java.lang.String getLink(); + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * For example: `http://www.example.com/review_5.html`.
+     * 
+ * + * string link = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for link. + */ + com.google.protobuf.ByteString getLinkBytes(); + } + + /** + * + * + *
+   * The URI of the review landing page.
+   * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink} + */ + public static final class ReviewLink extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink) + ReviewLinkOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ReviewLink"); + } + + // Use ReviewLink.newBuilder() to construct. + private ReviewLink(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ReviewLink() { + type_ = 0; + link_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_ReviewLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_ReviewLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.class, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Builder + .class); + } + + /** + * + * + *
+     * Type of the review URI.
+     * 
+ * + * Protobuf enum {@code + * google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type} + */ + public enum Type implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Type unspecified.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * The review page contains only this single review.
+       * 
+ * + * SINGLETON = 1; + */ + SINGLETON(1), + /** + * + * + *
+       * The review page contains a group of reviews including this review.
+       * 
+ * + * GROUP = 2; + */ + GROUP(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Type"); + } + + /** + * + * + *
+       * Type unspecified.
+       * 
+ * + * TYPE_UNSPECIFIED = 0; + */ + public static final int TYPE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * The review page contains only this single review.
+       * 
+ * + * SINGLETON = 1; + */ + public static final int SINGLETON_VALUE = 1; + + /** + * + * + *
+       * The review page contains a group of reviews including this review.
+       * 
+ * + * GROUP = 2; + */ + public static final int GROUP_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Type valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Type forNumber(int value) { + switch (value) { + case 0: + return TYPE_UNSPECIFIED; + case 1: + return SINGLETON; + case 2: + return GROUP; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Type findValueByNumber(int number) { + return Type.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Type[] VALUES = values(); + + public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Type(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type) + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_ = 0; + + /** + * + * + *
+     * Optional. Type of the review URI.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+     * Optional. Type of the review URI.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type + getType() { + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type result = + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type.forNumber( + type_); + return result == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type + .UNRECOGNIZED + : result; + } + + public static final int LINK_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object link_ = ""; + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * For example: `http://www.example.com/review_5.html`.
+     * 
+ * + * string link = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The link. + */ + @java.lang.Override + public java.lang.String getLink() { + java.lang.Object ref = link_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + link_ = s; + return s; + } + } + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * For example: `http://www.example.com/review_5.html`.
+     * 
+ * + * string link = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for link. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLinkBytes() { + java.lang.Object ref = link_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + link_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (type_ + != com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type + .TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(link_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, link_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (type_ + != com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type + .TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(link_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, link_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink)) { + return super.equals(obj); + } + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink other = + (com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink) obj; + + if (type_ != other.type_) return false; + if (!getLink().equals(other.getLink())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + LINK_FIELD_NUMBER; + hash = (53 * hash) + getLink().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The URI of the review landing page.
+     * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink) + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLinkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_ReviewLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_ReviewLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.class, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Builder + .class); + } + + // Construct using + // com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + type_ = 0; + link_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_ReviewLink_descriptor; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + getDefaultInstanceForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink build() { + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + buildPartial() { + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink result = + new com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.link_ = link_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink) { + return mergeFrom( + (com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink other) { + if (other + == com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + .getDefaultInstance()) return this; + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (!other.getLink().isEmpty()) { + link_ = other.link_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + link_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int type_ = 0; + + /** + * + * + *
+       * Optional. Type of the review URI.
+       * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + + /** + * + * + *
+       * Optional. Type of the review URI.
+       * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Type of the review URI.
+       * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The type. + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type + getType() { + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type result = + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type + .forNumber(type_); + return result == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Optional. Type of the review URI.
+       * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. Type of the review URI.
+       * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Type type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 0; + onChanged(); + return this; + } + + private java.lang.Object link_ = ""; + + /** + * + * + *
+       * Optional. The URI of the review landing page.
+       * For example: `http://www.example.com/review_5.html`.
+       * 
+ * + * string link = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The link. + */ + public java.lang.String getLink() { + java.lang.Object ref = link_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + link_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Optional. The URI of the review landing page.
+       * For example: `http://www.example.com/review_5.html`.
+       * 
+ * + * string link = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for link. + */ + public com.google.protobuf.ByteString getLinkBytes() { + java.lang.Object ref = link_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + link_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Optional. The URI of the review landing page.
+       * For example: `http://www.example.com/review_5.html`.
+       * 
+ * + * string link = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The link to set. + * @return This builder for chaining. + */ + public Builder setLink(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + link_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The URI of the review landing page.
+       * For example: `http://www.example.com/review_5.html`.
+       * 
+ * + * string link = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLink() { + link_ = getDefaultInstance().getLink(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Optional. The URI of the review landing page.
+       * For example: `http://www.example.com/review_5.html`.
+       * 
+ * + * string link = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for link to set. + * @return This builder for chaining. + */ + public Builder setLinkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + link_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink) + private static final com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink(); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReviewLink parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int AGGREGATOR_NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object aggregatorName_ = ""; + + /** + * + * + *
+   * Optional. The name of the aggregator of the product reviews.
+   *
+   * A publisher may use a reviews aggregator to manage reviews and provide
+   * the feeds. This element indicates the use of an aggregator and contains
+   * information about the aggregator.
+   * 
+ * + * optional string aggregator_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the aggregatorName field is set. + */ + @java.lang.Override + public boolean hasAggregatorName() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Optional. The name of the aggregator of the product reviews.
+   *
+   * A publisher may use a reviews aggregator to manage reviews and provide
+   * the feeds. This element indicates the use of an aggregator and contains
+   * information about the aggregator.
+   * 
+ * + * optional string aggregator_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The aggregatorName. + */ + @java.lang.Override + public java.lang.String getAggregatorName() { + java.lang.Object ref = aggregatorName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + aggregatorName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The name of the aggregator of the product reviews.
+   *
+   * A publisher may use a reviews aggregator to manage reviews and provide
+   * the feeds. This element indicates the use of an aggregator and contains
+   * information about the aggregator.
+   * 
+ * + * optional string aggregator_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for aggregatorName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAggregatorNameBytes() { + java.lang.Object ref = aggregatorName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + aggregatorName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SUBCLIENT_NAME_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object subclientName_ = ""; + + /** + * + * + *
+   * Optional. The name of the subclient of the product reviews.
+   *
+   * The subclient is an identifier of the product review source.
+   * It should be equivalent to the directory provided in the file data source
+   * path.
+   * 
+ * + * optional string subclient_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the subclientName field is set. + */ + @java.lang.Override + public boolean hasSubclientName() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. The name of the subclient of the product reviews.
+   *
+   * The subclient is an identifier of the product review source.
+   * It should be equivalent to the directory provided in the file data source
+   * path.
+   * 
+ * + * optional string subclient_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subclientName. + */ + @java.lang.Override + public java.lang.String getSubclientName() { + java.lang.Object ref = subclientName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subclientName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The name of the subclient of the product reviews.
+   *
+   * The subclient is an identifier of the product review source.
+   * It should be equivalent to the directory provided in the file data source
+   * path.
+   * 
+ * + * optional string subclient_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subclientName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSubclientNameBytes() { + java.lang.Object ref = subclientName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subclientName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLISHER_NAME_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object publisherName_ = ""; + + /** + * + * + *
+   * Optional. The name of the publisher of the product reviews.
+   *
+   * The information about the publisher, which may be a retailer,
+   * manufacturer, reviews service company, or any entity that publishes
+   * product reviews.
+   * 
+ * + * optional string publisher_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the publisherName field is set. + */ + @java.lang.Override + public boolean hasPublisherName() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Optional. The name of the publisher of the product reviews.
+   *
+   * The information about the publisher, which may be a retailer,
+   * manufacturer, reviews service company, or any entity that publishes
+   * product reviews.
+   * 
+ * + * optional string publisher_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The publisherName. + */ + @java.lang.Override + public java.lang.String getPublisherName() { + java.lang.Object ref = publisherName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publisherName_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The name of the publisher of the product reviews.
+   *
+   * The information about the publisher, which may be a retailer,
+   * manufacturer, reviews service company, or any entity that publishes
+   * product reviews.
+   * 
+ * + * optional string publisher_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for publisherName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublisherNameBytes() { + java.lang.Object ref = publisherName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publisherName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLISHER_FAVICON_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object publisherFavicon_ = ""; + + /** + * + * + *
+   * Optional. A link to the company favicon of the publisher. The image
+   * dimensions should be favicon size: 16x16 pixels. The image format should be
+   * GIF, JPG or PNG.
+   * 
+ * + * optional string publisher_favicon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the publisherFavicon field is set. + */ + @java.lang.Override + public boolean hasPublisherFavicon() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Optional. A link to the company favicon of the publisher. The image
+   * dimensions should be favicon size: 16x16 pixels. The image format should be
+   * GIF, JPG or PNG.
+   * 
+ * + * optional string publisher_favicon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The publisherFavicon. + */ + @java.lang.Override + public java.lang.String getPublisherFavicon() { + java.lang.Object ref = publisherFavicon_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publisherFavicon_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A link to the company favicon of the publisher. The image
+   * dimensions should be favicon size: 16x16 pixels. The image format should be
+   * GIF, JPG or PNG.
+   * 
+ * + * optional string publisher_favicon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for publisherFavicon. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublisherFaviconBytes() { + java.lang.Object ref = publisherFavicon_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publisherFavicon_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVIEWER_ID_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object reviewerId_ = ""; + + /** + * + * + *
+   * Optional. The author of the product review.
+   *
+   * A permanent, unique identifier for the author of the review in the
+   * publisher's system.
+   * 
+ * + * optional string reviewer_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewerId field is set. + */ + @java.lang.Override + public boolean hasReviewerId() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Optional. The author of the product review.
+   *
+   * A permanent, unique identifier for the author of the review in the
+   * publisher's system.
+   * 
+ * + * optional string reviewer_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewerId. + */ + @java.lang.Override + public java.lang.String getReviewerId() { + java.lang.Object ref = reviewerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reviewerId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The author of the product review.
+   *
+   * A permanent, unique identifier for the author of the review in the
+   * publisher's system.
+   * 
+ * + * optional string reviewer_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for reviewerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReviewerIdBytes() { + java.lang.Object ref = reviewerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reviewerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVIEWER_IS_ANONYMOUS_FIELD_NUMBER = 6; + private boolean reviewerIsAnonymous_ = false; + + /** + * + * + *
+   * Optional. Set to true if the reviewer should remain anonymous.
+   * 
+ * + * optional bool reviewer_is_anonymous = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewerIsAnonymous field is set. + */ + @java.lang.Override + public boolean hasReviewerIsAnonymous() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+   * Optional. Set to true if the reviewer should remain anonymous.
+   * 
+ * + * optional bool reviewer_is_anonymous = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewerIsAnonymous. + */ + @java.lang.Override + public boolean getReviewerIsAnonymous() { + return reviewerIsAnonymous_; + } + + public static final int REVIEWER_USERNAME_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object reviewerUsername_ = ""; + + /** + * + * + *
+   * Optional. The name of the reviewer of the product review.
+   * 
+ * + * optional string reviewer_username = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewerUsername field is set. + */ + @java.lang.Override + public boolean hasReviewerUsername() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+   * Optional. The name of the reviewer of the product review.
+   * 
+ * + * optional string reviewer_username = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewerUsername. + */ + @java.lang.Override + public java.lang.String getReviewerUsername() { + java.lang.Object ref = reviewerUsername_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reviewerUsername_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The name of the reviewer of the product review.
+   * 
+ * + * optional string reviewer_username = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for reviewerUsername. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReviewerUsernameBytes() { + java.lang.Object ref = reviewerUsername_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reviewerUsername_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVIEW_LANGUAGE_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object reviewLanguage_ = ""; + + /** + * + * + *
+   * Optional. The language of the review defined by BCP-47 language code.
+   * 
+ * + * optional string review_language = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewLanguage field is set. + */ + @java.lang.Override + public boolean hasReviewLanguage() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+   * Optional. The language of the review defined by BCP-47 language code.
+   * 
+ * + * optional string review_language = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewLanguage. + */ + @java.lang.Override + public java.lang.String getReviewLanguage() { + java.lang.Object ref = reviewLanguage_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reviewLanguage_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The language of the review defined by BCP-47 language code.
+   * 
+ * + * optional string review_language = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for reviewLanguage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReviewLanguageBytes() { + java.lang.Object ref = reviewLanguage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reviewLanguage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVIEW_COUNTRY_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object reviewCountry_ = ""; + + /** + * + * + *
+   * Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country
+   * Code.
+   * 
+ * + * optional string review_country = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewCountry field is set. + */ + @java.lang.Override + public boolean hasReviewCountry() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+   * Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country
+   * Code.
+   * 
+ * + * optional string review_country = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewCountry. + */ + @java.lang.Override + public java.lang.String getReviewCountry() { + java.lang.Object ref = reviewCountry_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reviewCountry_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country
+   * Code.
+   * 
+ * + * optional string review_country = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for reviewCountry. + */ + @java.lang.Override + public com.google.protobuf.ByteString getReviewCountryBytes() { + java.lang.Object ref = reviewCountry_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reviewCountry_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REVIEW_TIME_FIELD_NUMBER = 10; + private com.google.protobuf.Timestamp reviewTime_; + + /** + * + * + *
+   * Required. The timestamp indicating when the review was written.
+   * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reviewTime field is set. + */ + @java.lang.Override + public boolean hasReviewTime() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+   * Required. The timestamp indicating when the review was written.
+   * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reviewTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReviewTime() { + return reviewTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : reviewTime_; + } + + /** + * + * + *
+   * Required. The timestamp indicating when the review was written.
+   * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReviewTimeOrBuilder() { + return reviewTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : reviewTime_; + } + + public static final int TITLE_FIELD_NUMBER = 11; + + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + + /** + * + * + *
+   * Optional. The title of the review.
+   * 
+ * + * optional string title = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the title field is set. + */ + @java.lang.Override + public boolean hasTitle() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+   * Optional. The title of the review.
+   * 
+ * + * optional string title = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The title of the review.
+   * 
+ * + * optional string title = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 12; + + @SuppressWarnings("serial") + private volatile java.lang.Object content_ = ""; + + /** + * + * + *
+   * Optional. The content of the review. If empty, the content might still get
+   * populated from pros and cons.
+   * 
+ * + * optional string content = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the content field is set. + */ + @java.lang.Override + public boolean hasContent() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+   * Optional. The content of the review. If empty, the content might still get
+   * populated from pros and cons.
+   * 
+ * + * optional string content = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The content of the review. If empty, the content might still get
+   * populated from pros and cons.
+   * 
+ * + * optional string content = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PROS_FIELD_NUMBER = 13; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList pros_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Contains the advantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+   * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the pros. + */ + public com.google.protobuf.ProtocolStringList getProsList() { + return pros_; + } + + /** + * + * + *
+   * Optional. Contains the advantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+   * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of pros. + */ + public int getProsCount() { + return pros_.size(); + } + + /** + * + * + *
+   * Optional. Contains the advantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+   * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The pros at the given index. + */ + public java.lang.String getPros(int index) { + return pros_.get(index); + } + + /** + * + * + *
+   * Optional. Contains the advantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+   * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the pros at the given index. + */ + public com.google.protobuf.ByteString getProsBytes(int index) { + return pros_.getByteString(index); + } + + public static final int CONS_FIELD_NUMBER = 14; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList cons_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Contains the disadvantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "con:" unless it was written by the reviewer.
+   * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the cons. + */ + public com.google.protobuf.ProtocolStringList getConsList() { + return cons_; + } + + /** + * + * + *
+   * Optional. Contains the disadvantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "con:" unless it was written by the reviewer.
+   * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of cons. + */ + public int getConsCount() { + return cons_.size(); + } + + /** + * + * + *
+   * Optional. Contains the disadvantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "con:" unless it was written by the reviewer.
+   * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The cons at the given index. + */ + public java.lang.String getCons(int index) { + return cons_.get(index); + } + + /** + * + * + *
+   * Optional. Contains the disadvantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "con:" unless it was written by the reviewer.
+   * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the cons at the given index. + */ + public com.google.protobuf.ByteString getConsBytes(int index) { + return cons_.getByteString(index); + } + + public static final int REVIEW_LINK_FIELD_NUMBER = 15; + private com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink reviewLink_; + + /** + * + * + *
+   * Optional. The URI of the review landing page.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the reviewLink field is set. + */ + @java.lang.Override + public boolean hasReviewLink() { + return ((bitField0_ & 0x00001000) != 0); + } + + /** + * + * + *
+   * Optional. The URI of the review landing page.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The reviewLink. + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + getReviewLink() { + return reviewLink_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + .getDefaultInstance() + : reviewLink_; + } + + /** + * + * + *
+   * Optional. The URI of the review landing page.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLinkOrBuilder + getReviewLinkOrBuilder() { + return reviewLink_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + .getDefaultInstance() + : reviewLink_; + } + + public static final int REVIEWER_IMAGE_LINKS_FIELD_NUMBER = 16; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList reviewerImageLinks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. A URI to an image of the reviewed product created by the review
+   * author. The URI does not have to end with an image file extension.
+   * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the reviewerImageLinks. + */ + public com.google.protobuf.ProtocolStringList getReviewerImageLinksList() { + return reviewerImageLinks_; + } + + /** + * + * + *
+   * Optional. A URI to an image of the reviewed product created by the review
+   * author. The URI does not have to end with an image file extension.
+   * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of reviewerImageLinks. + */ + public int getReviewerImageLinksCount() { + return reviewerImageLinks_.size(); + } + + /** + * + * + *
+   * Optional. A URI to an image of the reviewed product created by the review
+   * author. The URI does not have to end with an image file extension.
+   * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The reviewerImageLinks at the given index. + */ + public java.lang.String getReviewerImageLinks(int index) { + return reviewerImageLinks_.get(index); + } + + /** + * + * + *
+   * Optional. A URI to an image of the reviewed product created by the review
+   * author. The URI does not have to end with an image file extension.
+   * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the reviewerImageLinks at the given index. + */ + public com.google.protobuf.ByteString getReviewerImageLinksBytes(int index) { + return reviewerImageLinks_.getByteString(index); + } + + public static final int MIN_RATING_FIELD_NUMBER = 17; + private long minRating_ = 0L; + + /** + * + * + *
+   * Optional. Contains the ratings associated with the review.
+   * The minimum possible number for the rating. This should be the worst
+   * possible rating and should not be a value for no rating.
+   * 
+ * + * optional int64 min_rating = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minRating field is set. + */ + @java.lang.Override + public boolean hasMinRating() { + return ((bitField0_ & 0x00002000) != 0); + } + + /** + * + * + *
+   * Optional. Contains the ratings associated with the review.
+   * The minimum possible number for the rating. This should be the worst
+   * possible rating and should not be a value for no rating.
+   * 
+ * + * optional int64 min_rating = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minRating. + */ + @java.lang.Override + public long getMinRating() { + return minRating_; + } + + public static final int MAX_RATING_FIELD_NUMBER = 18; + private long maxRating_ = 0L; + + /** + * + * + *
+   * Optional. The maximum possible number for the rating. The value of the max
+   * rating must be greater than the value of the min attribute.
+   * 
+ * + * optional int64 max_rating = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the maxRating field is set. + */ + @java.lang.Override + public boolean hasMaxRating() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
+   * Optional. The maximum possible number for the rating. The value of the max
+   * rating must be greater than the value of the min attribute.
+   * 
+ * + * optional int64 max_rating = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxRating. + */ + @java.lang.Override + public long getMaxRating() { + return maxRating_; + } + + public static final int RATING_FIELD_NUMBER = 19; + private double rating_ = 0D; + + /** + * + * + *
+   * Optional. The reviewer's overall rating of the product.
+   * 
+ * + * optional double rating = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the rating field is set. + */ + @java.lang.Override + public boolean hasRating() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
+   * Optional. The reviewer's overall rating of the product.
+   * 
+ * + * optional double rating = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rating. + */ + @java.lang.Override + public double getRating() { + return rating_; + } + + public static final int PRODUCT_NAMES_FIELD_NUMBER = 20; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList productNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Descriptive name of a product.
+   * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the productNames. + */ + public com.google.protobuf.ProtocolStringList getProductNamesList() { + return productNames_; + } + + /** + * + * + *
+   * Optional. Descriptive name of a product.
+   * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of productNames. + */ + public int getProductNamesCount() { + return productNames_.size(); + } + + /** + * + * + *
+   * Optional. Descriptive name of a product.
+   * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The productNames at the given index. + */ + public java.lang.String getProductNames(int index) { + return productNames_.get(index); + } + + /** + * + * + *
+   * Optional. Descriptive name of a product.
+   * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the productNames at the given index. + */ + public com.google.protobuf.ByteString getProductNamesBytes(int index) { + return productNames_.getByteString(index); + } + + public static final int PRODUCT_LINKS_FIELD_NUMBER = 21; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList productLinks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. The URI of the product. This URI can have the same value as the
+   * `review_link` element, if the review URI and the product URI are the
+   * same.
+   * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the productLinks. + */ + public com.google.protobuf.ProtocolStringList getProductLinksList() { + return productLinks_; + } + + /** + * + * + *
+   * Optional. The URI of the product. This URI can have the same value as the
+   * `review_link` element, if the review URI and the product URI are the
+   * same.
+   * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of productLinks. + */ + public int getProductLinksCount() { + return productLinks_.size(); + } + + /** + * + * + *
+   * Optional. The URI of the product. This URI can have the same value as the
+   * `review_link` element, if the review URI and the product URI are the
+   * same.
+   * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The productLinks at the given index. + */ + public java.lang.String getProductLinks(int index) { + return productLinks_.get(index); + } + + /** + * + * + *
+   * Optional. The URI of the product. This URI can have the same value as the
+   * `review_link` element, if the review URI and the product URI are the
+   * same.
+   * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the productLinks at the given index. + */ + public com.google.protobuf.ByteString getProductLinksBytes(int index) { + return productLinks_.getByteString(index); + } + + public static final int ASINS_FIELD_NUMBER = 22; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList asins_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+   * associated with a product.
+   * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the asins. + */ + public com.google.protobuf.ProtocolStringList getAsinsList() { + return asins_; + } + + /** + * + * + *
+   * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+   * associated with a product.
+   * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of asins. + */ + public int getAsinsCount() { + return asins_.size(); + } + + /** + * + * + *
+   * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+   * associated with a product.
+   * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The asins at the given index. + */ + public java.lang.String getAsins(int index) { + return asins_.get(index); + } + + /** + * + * + *
+   * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+   * associated with a product.
+   * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the asins at the given index. + */ + public com.google.protobuf.ByteString getAsinsBytes(int index) { + return asins_.getByteString(index); + } + + public static final int GTINS_FIELD_NUMBER = 23; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList gtins_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Contains GTINs (global trade item numbers) associated with a
+   * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+   * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the gtins. + */ + public com.google.protobuf.ProtocolStringList getGtinsList() { + return gtins_; + } + + /** + * + * + *
+   * Optional. Contains GTINs (global trade item numbers) associated with a
+   * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+   * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of gtins. + */ + public int getGtinsCount() { + return gtins_.size(); + } + + /** + * + * + *
+   * Optional. Contains GTINs (global trade item numbers) associated with a
+   * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+   * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The gtins at the given index. + */ + public java.lang.String getGtins(int index) { + return gtins_.get(index); + } + + /** + * + * + *
+   * Optional. Contains GTINs (global trade item numbers) associated with a
+   * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+   * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the gtins at the given index. + */ + public com.google.protobuf.ByteString getGtinsBytes(int index) { + return gtins_.getByteString(index); + } + + public static final int MPNS_FIELD_NUMBER = 24; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList mpns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Contains MPNs (manufacturer part numbers) associated with a
+   * product.
+   * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the mpns. + */ + public com.google.protobuf.ProtocolStringList getMpnsList() { + return mpns_; + } + + /** + * + * + *
+   * Optional. Contains MPNs (manufacturer part numbers) associated with a
+   * product.
+   * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of mpns. + */ + public int getMpnsCount() { + return mpns_.size(); + } + + /** + * + * + *
+   * Optional. Contains MPNs (manufacturer part numbers) associated with a
+   * product.
+   * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The mpns at the given index. + */ + public java.lang.String getMpns(int index) { + return mpns_.get(index); + } + + /** + * + * + *
+   * Optional. Contains MPNs (manufacturer part numbers) associated with a
+   * product.
+   * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the mpns at the given index. + */ + public com.google.protobuf.ByteString getMpnsBytes(int index) { + return mpns_.getByteString(index); + } + + public static final int SKUS_FIELD_NUMBER = 25; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList skus_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Contains SKUs (stock keeping units) associated with a product.
+   * Often this matches the product Offer Id in the product feed.
+   * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the skus. + */ + public com.google.protobuf.ProtocolStringList getSkusList() { + return skus_; + } + + /** + * + * + *
+   * Optional. Contains SKUs (stock keeping units) associated with a product.
+   * Often this matches the product Offer Id in the product feed.
+   * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of skus. + */ + public int getSkusCount() { + return skus_.size(); + } + + /** + * + * + *
+   * Optional. Contains SKUs (stock keeping units) associated with a product.
+   * Often this matches the product Offer Id in the product feed.
+   * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The skus at the given index. + */ + public java.lang.String getSkus(int index) { + return skus_.get(index); + } + + /** + * + * + *
+   * Optional. Contains SKUs (stock keeping units) associated with a product.
+   * Often this matches the product Offer Id in the product feed.
+   * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the skus at the given index. + */ + public com.google.protobuf.ByteString getSkusBytes(int index) { + return skus_.getByteString(index); + } + + public static final int BRANDS_FIELD_NUMBER = 26; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList brands_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+   * Optional. Contains brand names associated with a product.
+   * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the brands. + */ + public com.google.protobuf.ProtocolStringList getBrandsList() { + return brands_; + } + + /** + * + * + *
+   * Optional. Contains brand names associated with a product.
+   * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of brands. + */ + public int getBrandsCount() { + return brands_.size(); + } + + /** + * + * + *
+   * Optional. Contains brand names associated with a product.
+   * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The brands at the given index. + */ + public java.lang.String getBrands(int index) { + return brands_.get(index); + } + + /** + * + * + *
+   * Optional. Contains brand names associated with a product.
+   * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the brands at the given index. + */ + public com.google.protobuf.ByteString getBrandsBytes(int index) { + return brands_.getByteString(index); + } + + public static final int IS_SPAM_FIELD_NUMBER = 27; + private boolean isSpam_ = false; + + /** + * + * + *
+   * Optional. Indicates whether the review is marked as spam in the publisher's
+   * system.
+   * 
+ * + * optional bool is_spam = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the isSpam field is set. + */ + @java.lang.Override + public boolean hasIsSpam() { + return ((bitField0_ & 0x00010000) != 0); + } + + /** + * + * + *
+   * Optional. Indicates whether the review is marked as spam in the publisher's
+   * system.
+   * 
+ * + * optional bool is_spam = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isSpam. + */ + @java.lang.Override + public boolean getIsSpam() { + return isSpam_; + } + + public static final int IS_VERIFIED_PURCHASE_FIELD_NUMBER = 30; + private boolean isVerifiedPurchase_ = false; + + /** + * + * + *
+   * Optional. Indicates whether the reviewer's purchase is verified.
+   * 
+ * + * optional bool is_verified_purchase = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the isVerifiedPurchase field is set. + */ + @java.lang.Override + public boolean hasIsVerifiedPurchase() { + return ((bitField0_ & 0x00020000) != 0); + } + + /** + * + * + *
+   * Optional. Indicates whether the reviewer's purchase is verified.
+   * 
+ * + * optional bool is_verified_purchase = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isVerifiedPurchase. + */ + @java.lang.Override + public boolean getIsVerifiedPurchase() { + return isVerifiedPurchase_; + } + + public static final int IS_INCENTIVIZED_REVIEW_FIELD_NUMBER = 31; + private boolean isIncentivizedReview_ = false; + + /** + * + * + *
+   * Optional. Indicates whether the review is incentivized.
+   * 
+ * + * optional bool is_incentivized_review = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the isIncentivizedReview field is set. + */ + @java.lang.Override + public boolean hasIsIncentivizedReview() { + return ((bitField0_ & 0x00040000) != 0); + } + + /** + * + * + *
+   * Optional. Indicates whether the review is incentivized.
+   * 
+ * + * optional bool is_incentivized_review = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The isIncentivizedReview. + */ + @java.lang.Override + public boolean getIsIncentivizedReview() { + return isIncentivizedReview_; + } + + public static final int COLLECTION_METHOD_FIELD_NUMBER = 28; + private int collectionMethod_ = 0; + + /** + * + * + *
+   * Optional. The method used to collect the review.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod collection_method = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for collectionMethod. + */ + @java.lang.Override + public int getCollectionMethodValue() { + return collectionMethod_; + } + + /** + * + * + *
+   * Optional. The method used to collect the review.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod collection_method = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The collectionMethod. + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod + getCollectionMethod() { + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod result = + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod.forNumber( + collectionMethod_); + return result == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod + .UNRECOGNIZED + : result; + } + + public static final int TRANSACTION_ID_FIELD_NUMBER = 29; + + @SuppressWarnings("serial") + private volatile java.lang.Object transactionId_ = ""; + + /** + * + * + *
+   * Optional. A permanent, unique identifier for the transaction associated
+   * with the review in the publisher's system. This ID can be used to indicate
+   * that multiple reviews are associated with the same transaction.
+   * 
+ * + * string transaction_id = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The transactionId. + */ + @java.lang.Override + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A permanent, unique identifier for the transaction associated
+   * with the review in the publisher's system. This ID can be used to indicate
+   * that multiple reviews are associated with the same transaction.
+   * 
+ * + * string transaction_id = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for transactionId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, aggregatorName_); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, subclientName_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, publisherName_); + } + if (((bitField0_ & 0x00000008) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, publisherFavicon_); + } + if (((bitField0_ & 0x00000010) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, reviewerId_); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeBool(6, reviewerIsAnonymous_); + } + if (((bitField0_ & 0x00000040) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, reviewerUsername_); + } + if (((bitField0_ & 0x00000080) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, reviewLanguage_); + } + if (((bitField0_ & 0x00000100) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 9, reviewCountry_); + } + if (((bitField0_ & 0x00000200) != 0)) { + output.writeMessage(10, getReviewTime()); + } + if (((bitField0_ & 0x00000400) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 11, title_); + } + if (((bitField0_ & 0x00000800) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 12, content_); + } + for (int i = 0; i < pros_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 13, pros_.getRaw(i)); + } + for (int i = 0; i < cons_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 14, cons_.getRaw(i)); + } + if (((bitField0_ & 0x00001000) != 0)) { + output.writeMessage(15, getReviewLink()); + } + for (int i = 0; i < reviewerImageLinks_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 16, reviewerImageLinks_.getRaw(i)); + } + if (((bitField0_ & 0x00002000) != 0)) { + output.writeInt64(17, minRating_); + } + if (((bitField0_ & 0x00004000) != 0)) { + output.writeInt64(18, maxRating_); + } + if (((bitField0_ & 0x00008000) != 0)) { + output.writeDouble(19, rating_); + } + for (int i = 0; i < productNames_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 20, productNames_.getRaw(i)); + } + for (int i = 0; i < productLinks_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 21, productLinks_.getRaw(i)); + } + for (int i = 0; i < asins_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 22, asins_.getRaw(i)); + } + for (int i = 0; i < gtins_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 23, gtins_.getRaw(i)); + } + for (int i = 0; i < mpns_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 24, mpns_.getRaw(i)); + } + for (int i = 0; i < skus_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 25, skus_.getRaw(i)); + } + for (int i = 0; i < brands_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 26, brands_.getRaw(i)); + } + if (((bitField0_ & 0x00010000) != 0)) { + output.writeBool(27, isSpam_); + } + if (collectionMethod_ + != com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod + .COLLECTION_METHOD_UNSPECIFIED + .getNumber()) { + output.writeEnum(28, collectionMethod_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 29, transactionId_); + } + if (((bitField0_ & 0x00020000) != 0)) { + output.writeBool(30, isVerifiedPurchase_); + } + if (((bitField0_ & 0x00040000) != 0)) { + output.writeBool(31, isIncentivizedReview_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, aggregatorName_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, subclientName_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, publisherName_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, publisherFavicon_); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, reviewerId_); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, reviewerIsAnonymous_); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, reviewerUsername_); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, reviewLanguage_); + } + if (((bitField0_ & 0x00000100) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, reviewCountry_); + } + if (((bitField0_ & 0x00000200) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getReviewTime()); + } + if (((bitField0_ & 0x00000400) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, title_); + } + if (((bitField0_ & 0x00000800) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(12, content_); + } + { + int dataSize = 0; + for (int i = 0; i < pros_.size(); i++) { + dataSize += computeStringSizeNoTag(pros_.getRaw(i)); + } + size += dataSize; + size += 1 * getProsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < cons_.size(); i++) { + dataSize += computeStringSizeNoTag(cons_.getRaw(i)); + } + size += dataSize; + size += 1 * getConsList().size(); + } + if (((bitField0_ & 0x00001000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(15, getReviewLink()); + } + { + int dataSize = 0; + for (int i = 0; i < reviewerImageLinks_.size(); i++) { + dataSize += computeStringSizeNoTag(reviewerImageLinks_.getRaw(i)); + } + size += dataSize; + size += 2 * getReviewerImageLinksList().size(); + } + if (((bitField0_ & 0x00002000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(17, minRating_); + } + if (((bitField0_ & 0x00004000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(18, maxRating_); + } + if (((bitField0_ & 0x00008000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(19, rating_); + } + { + int dataSize = 0; + for (int i = 0; i < productNames_.size(); i++) { + dataSize += computeStringSizeNoTag(productNames_.getRaw(i)); + } + size += dataSize; + size += 2 * getProductNamesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < productLinks_.size(); i++) { + dataSize += computeStringSizeNoTag(productLinks_.getRaw(i)); + } + size += dataSize; + size += 2 * getProductLinksList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < asins_.size(); i++) { + dataSize += computeStringSizeNoTag(asins_.getRaw(i)); + } + size += dataSize; + size += 2 * getAsinsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < gtins_.size(); i++) { + dataSize += computeStringSizeNoTag(gtins_.getRaw(i)); + } + size += dataSize; + size += 2 * getGtinsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < mpns_.size(); i++) { + dataSize += computeStringSizeNoTag(mpns_.getRaw(i)); + } + size += dataSize; + size += 2 * getMpnsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < skus_.size(); i++) { + dataSize += computeStringSizeNoTag(skus_.getRaw(i)); + } + size += dataSize; + size += 2 * getSkusList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < brands_.size(); i++) { + dataSize += computeStringSizeNoTag(brands_.getRaw(i)); + } + size += dataSize; + size += 2 * getBrandsList().size(); + } + if (((bitField0_ & 0x00010000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(27, isSpam_); + } + if (collectionMethod_ + != com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod + .COLLECTION_METHOD_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(28, collectionMethod_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(transactionId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(29, transactionId_); + } + if (((bitField0_ & 0x00020000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(30, isVerifiedPurchase_); + } + if (((bitField0_ & 0x00040000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(31, isIncentivizedReview_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reviews.v1.ProductReviewAttributes)) { + return super.equals(obj); + } + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes other = + (com.google.shopping.merchant.reviews.v1.ProductReviewAttributes) obj; + + if (hasAggregatorName() != other.hasAggregatorName()) return false; + if (hasAggregatorName()) { + if (!getAggregatorName().equals(other.getAggregatorName())) return false; + } + if (hasSubclientName() != other.hasSubclientName()) return false; + if (hasSubclientName()) { + if (!getSubclientName().equals(other.getSubclientName())) return false; + } + if (hasPublisherName() != other.hasPublisherName()) return false; + if (hasPublisherName()) { + if (!getPublisherName().equals(other.getPublisherName())) return false; + } + if (hasPublisherFavicon() != other.hasPublisherFavicon()) return false; + if (hasPublisherFavicon()) { + if (!getPublisherFavicon().equals(other.getPublisherFavicon())) return false; + } + if (hasReviewerId() != other.hasReviewerId()) return false; + if (hasReviewerId()) { + if (!getReviewerId().equals(other.getReviewerId())) return false; + } + if (hasReviewerIsAnonymous() != other.hasReviewerIsAnonymous()) return false; + if (hasReviewerIsAnonymous()) { + if (getReviewerIsAnonymous() != other.getReviewerIsAnonymous()) return false; + } + if (hasReviewerUsername() != other.hasReviewerUsername()) return false; + if (hasReviewerUsername()) { + if (!getReviewerUsername().equals(other.getReviewerUsername())) return false; + } + if (hasReviewLanguage() != other.hasReviewLanguage()) return false; + if (hasReviewLanguage()) { + if (!getReviewLanguage().equals(other.getReviewLanguage())) return false; + } + if (hasReviewCountry() != other.hasReviewCountry()) return false; + if (hasReviewCountry()) { + if (!getReviewCountry().equals(other.getReviewCountry())) return false; + } + if (hasReviewTime() != other.hasReviewTime()) return false; + if (hasReviewTime()) { + if (!getReviewTime().equals(other.getReviewTime())) return false; + } + if (hasTitle() != other.hasTitle()) return false; + if (hasTitle()) { + if (!getTitle().equals(other.getTitle())) return false; + } + if (hasContent() != other.hasContent()) return false; + if (hasContent()) { + if (!getContent().equals(other.getContent())) return false; + } + if (!getProsList().equals(other.getProsList())) return false; + if (!getConsList().equals(other.getConsList())) return false; + if (hasReviewLink() != other.hasReviewLink()) return false; + if (hasReviewLink()) { + if (!getReviewLink().equals(other.getReviewLink())) return false; + } + if (!getReviewerImageLinksList().equals(other.getReviewerImageLinksList())) return false; + if (hasMinRating() != other.hasMinRating()) return false; + if (hasMinRating()) { + if (getMinRating() != other.getMinRating()) return false; + } + if (hasMaxRating() != other.hasMaxRating()) return false; + if (hasMaxRating()) { + if (getMaxRating() != other.getMaxRating()) return false; + } + if (hasRating() != other.hasRating()) return false; + if (hasRating()) { + if (java.lang.Double.doubleToLongBits(getRating()) + != java.lang.Double.doubleToLongBits(other.getRating())) return false; + } + if (!getProductNamesList().equals(other.getProductNamesList())) return false; + if (!getProductLinksList().equals(other.getProductLinksList())) return false; + if (!getAsinsList().equals(other.getAsinsList())) return false; + if (!getGtinsList().equals(other.getGtinsList())) return false; + if (!getMpnsList().equals(other.getMpnsList())) return false; + if (!getSkusList().equals(other.getSkusList())) return false; + if (!getBrandsList().equals(other.getBrandsList())) return false; + if (hasIsSpam() != other.hasIsSpam()) return false; + if (hasIsSpam()) { + if (getIsSpam() != other.getIsSpam()) return false; + } + if (hasIsVerifiedPurchase() != other.hasIsVerifiedPurchase()) return false; + if (hasIsVerifiedPurchase()) { + if (getIsVerifiedPurchase() != other.getIsVerifiedPurchase()) return false; + } + if (hasIsIncentivizedReview() != other.hasIsIncentivizedReview()) return false; + if (hasIsIncentivizedReview()) { + if (getIsIncentivizedReview() != other.getIsIncentivizedReview()) return false; + } + if (collectionMethod_ != other.collectionMethod_) return false; + if (!getTransactionId().equals(other.getTransactionId())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAggregatorName()) { + hash = (37 * hash) + AGGREGATOR_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAggregatorName().hashCode(); + } + if (hasSubclientName()) { + hash = (37 * hash) + SUBCLIENT_NAME_FIELD_NUMBER; + hash = (53 * hash) + getSubclientName().hashCode(); + } + if (hasPublisherName()) { + hash = (37 * hash) + PUBLISHER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getPublisherName().hashCode(); + } + if (hasPublisherFavicon()) { + hash = (37 * hash) + PUBLISHER_FAVICON_FIELD_NUMBER; + hash = (53 * hash) + getPublisherFavicon().hashCode(); + } + if (hasReviewerId()) { + hash = (37 * hash) + REVIEWER_ID_FIELD_NUMBER; + hash = (53 * hash) + getReviewerId().hashCode(); + } + if (hasReviewerIsAnonymous()) { + hash = (37 * hash) + REVIEWER_IS_ANONYMOUS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReviewerIsAnonymous()); + } + if (hasReviewerUsername()) { + hash = (37 * hash) + REVIEWER_USERNAME_FIELD_NUMBER; + hash = (53 * hash) + getReviewerUsername().hashCode(); + } + if (hasReviewLanguage()) { + hash = (37 * hash) + REVIEW_LANGUAGE_FIELD_NUMBER; + hash = (53 * hash) + getReviewLanguage().hashCode(); + } + if (hasReviewCountry()) { + hash = (37 * hash) + REVIEW_COUNTRY_FIELD_NUMBER; + hash = (53 * hash) + getReviewCountry().hashCode(); + } + if (hasReviewTime()) { + hash = (37 * hash) + REVIEW_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReviewTime().hashCode(); + } + if (hasTitle()) { + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + } + if (hasContent()) { + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + } + if (getProsCount() > 0) { + hash = (37 * hash) + PROS_FIELD_NUMBER; + hash = (53 * hash) + getProsList().hashCode(); + } + if (getConsCount() > 0) { + hash = (37 * hash) + CONS_FIELD_NUMBER; + hash = (53 * hash) + getConsList().hashCode(); + } + if (hasReviewLink()) { + hash = (37 * hash) + REVIEW_LINK_FIELD_NUMBER; + hash = (53 * hash) + getReviewLink().hashCode(); + } + if (getReviewerImageLinksCount() > 0) { + hash = (37 * hash) + REVIEWER_IMAGE_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getReviewerImageLinksList().hashCode(); + } + if (hasMinRating()) { + hash = (37 * hash) + MIN_RATING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinRating()); + } + if (hasMaxRating()) { + hash = (37 * hash) + MAX_RATING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxRating()); + } + if (hasRating()) { + hash = (37 * hash) + RATING_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRating())); + } + if (getProductNamesCount() > 0) { + hash = (37 * hash) + PRODUCT_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getProductNamesList().hashCode(); + } + if (getProductLinksCount() > 0) { + hash = (37 * hash) + PRODUCT_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getProductLinksList().hashCode(); + } + if (getAsinsCount() > 0) { + hash = (37 * hash) + ASINS_FIELD_NUMBER; + hash = (53 * hash) + getAsinsList().hashCode(); + } + if (getGtinsCount() > 0) { + hash = (37 * hash) + GTINS_FIELD_NUMBER; + hash = (53 * hash) + getGtinsList().hashCode(); + } + if (getMpnsCount() > 0) { + hash = (37 * hash) + MPNS_FIELD_NUMBER; + hash = (53 * hash) + getMpnsList().hashCode(); + } + if (getSkusCount() > 0) { + hash = (37 * hash) + SKUS_FIELD_NUMBER; + hash = (53 * hash) + getSkusList().hashCode(); + } + if (getBrandsCount() > 0) { + hash = (37 * hash) + BRANDS_FIELD_NUMBER; + hash = (53 * hash) + getBrandsList().hashCode(); + } + if (hasIsSpam()) { + hash = (37 * hash) + IS_SPAM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsSpam()); + } + if (hasIsVerifiedPurchase()) { + hash = (37 * hash) + IS_VERIFIED_PURCHASE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsVerifiedPurchase()); + } + if (hasIsIncentivizedReview()) { + hash = (37 * hash) + IS_INCENTIVIZED_REVIEW_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsIncentivizedReview()); + } + hash = (37 * hash) + COLLECTION_METHOD_FIELD_NUMBER; + hash = (53 * hash) + collectionMethod_; + hash = (37 * hash) + TRANSACTION_ID_FIELD_NUMBER; + hash = (53 * hash) + getTransactionId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Attributes.
+   * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.ProductReviewAttributes} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reviews.v1.ProductReviewAttributes) + com.google.shopping.merchant.reviews.v1.ProductReviewAttributesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.class, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.Builder.class); + } + + // Construct using com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetReviewTimeFieldBuilder(); + internalGetReviewLinkFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + aggregatorName_ = ""; + subclientName_ = ""; + publisherName_ = ""; + publisherFavicon_ = ""; + reviewerId_ = ""; + reviewerIsAnonymous_ = false; + reviewerUsername_ = ""; + reviewLanguage_ = ""; + reviewCountry_ = ""; + reviewTime_ = null; + if (reviewTimeBuilder_ != null) { + reviewTimeBuilder_.dispose(); + reviewTimeBuilder_ = null; + } + title_ = ""; + content_ = ""; + pros_ = com.google.protobuf.LazyStringArrayList.emptyList(); + cons_ = com.google.protobuf.LazyStringArrayList.emptyList(); + reviewLink_ = null; + if (reviewLinkBuilder_ != null) { + reviewLinkBuilder_.dispose(); + reviewLinkBuilder_ = null; + } + reviewerImageLinks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + minRating_ = 0L; + maxRating_ = 0L; + rating_ = 0D; + productNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + productLinks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + asins_ = com.google.protobuf.LazyStringArrayList.emptyList(); + gtins_ = com.google.protobuf.LazyStringArrayList.emptyList(); + mpns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + skus_ = com.google.protobuf.LazyStringArrayList.emptyList(); + brands_ = com.google.protobuf.LazyStringArrayList.emptyList(); + isSpam_ = false; + isVerifiedPurchase_ = false; + isIncentivizedReview_ = false; + collectionMethod_ = 0; + transactionId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_descriptor; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes + getDefaultInstanceForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes build() { + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes buildPartial() { + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes result = + new com.google.shopping.merchant.reviews.v1.ProductReviewAttributes(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.aggregatorName_ = aggregatorName_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subclientName_ = subclientName_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.publisherName_ = publisherName_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.publisherFavicon_ = publisherFavicon_; + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.reviewerId_ = reviewerId_; + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.reviewerIsAnonymous_ = reviewerIsAnonymous_; + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.reviewerUsername_ = reviewerUsername_; + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.reviewLanguage_ = reviewLanguage_; + to_bitField0_ |= 0x00000080; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.reviewCountry_ = reviewCountry_; + to_bitField0_ |= 0x00000100; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.reviewTime_ = reviewTimeBuilder_ == null ? reviewTime_ : reviewTimeBuilder_.build(); + to_bitField0_ |= 0x00000200; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.title_ = title_; + to_bitField0_ |= 0x00000400; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.content_ = content_; + to_bitField0_ |= 0x00000800; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + pros_.makeImmutable(); + result.pros_ = pros_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + cons_.makeImmutable(); + result.cons_ = cons_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.reviewLink_ = reviewLinkBuilder_ == null ? reviewLink_ : reviewLinkBuilder_.build(); + to_bitField0_ |= 0x00001000; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + reviewerImageLinks_.makeImmutable(); + result.reviewerImageLinks_ = reviewerImageLinks_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.minRating_ = minRating_; + to_bitField0_ |= 0x00002000; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.maxRating_ = maxRating_; + to_bitField0_ |= 0x00004000; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.rating_ = rating_; + to_bitField0_ |= 0x00008000; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + productNames_.makeImmutable(); + result.productNames_ = productNames_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + productLinks_.makeImmutable(); + result.productLinks_ = productLinks_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + asins_.makeImmutable(); + result.asins_ = asins_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + gtins_.makeImmutable(); + result.gtins_ = gtins_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + mpns_.makeImmutable(); + result.mpns_ = mpns_; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + skus_.makeImmutable(); + result.skus_ = skus_; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + brands_.makeImmutable(); + result.brands_ = brands_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.isSpam_ = isSpam_; + to_bitField0_ |= 0x00010000; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.isVerifiedPurchase_ = isVerifiedPurchase_; + to_bitField0_ |= 0x00020000; + } + if (((from_bitField0_ & 0x10000000) != 0)) { + result.isIncentivizedReview_ = isIncentivizedReview_; + to_bitField0_ |= 0x00040000; + } + if (((from_bitField0_ & 0x20000000) != 0)) { + result.collectionMethod_ = collectionMethod_; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.transactionId_ = transactionId_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reviews.v1.ProductReviewAttributes) { + return mergeFrom((com.google.shopping.merchant.reviews.v1.ProductReviewAttributes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes other) { + if (other + == com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.getDefaultInstance()) + return this; + if (other.hasAggregatorName()) { + aggregatorName_ = other.aggregatorName_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSubclientName()) { + subclientName_ = other.subclientName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPublisherName()) { + publisherName_ = other.publisherName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasPublisherFavicon()) { + publisherFavicon_ = other.publisherFavicon_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.hasReviewerId()) { + reviewerId_ = other.reviewerId_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (other.hasReviewerIsAnonymous()) { + setReviewerIsAnonymous(other.getReviewerIsAnonymous()); + } + if (other.hasReviewerUsername()) { + reviewerUsername_ = other.reviewerUsername_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.hasReviewLanguage()) { + reviewLanguage_ = other.reviewLanguage_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.hasReviewCountry()) { + reviewCountry_ = other.reviewCountry_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.hasReviewTime()) { + mergeReviewTime(other.getReviewTime()); + } + if (other.hasTitle()) { + title_ = other.title_; + bitField0_ |= 0x00000400; + onChanged(); + } + if (other.hasContent()) { + content_ = other.content_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (!other.pros_.isEmpty()) { + if (pros_.isEmpty()) { + pros_ = other.pros_; + bitField0_ |= 0x00001000; + } else { + ensureProsIsMutable(); + pros_.addAll(other.pros_); + } + onChanged(); + } + if (!other.cons_.isEmpty()) { + if (cons_.isEmpty()) { + cons_ = other.cons_; + bitField0_ |= 0x00002000; + } else { + ensureConsIsMutable(); + cons_.addAll(other.cons_); + } + onChanged(); + } + if (other.hasReviewLink()) { + mergeReviewLink(other.getReviewLink()); + } + if (!other.reviewerImageLinks_.isEmpty()) { + if (reviewerImageLinks_.isEmpty()) { + reviewerImageLinks_ = other.reviewerImageLinks_; + bitField0_ |= 0x00008000; + } else { + ensureReviewerImageLinksIsMutable(); + reviewerImageLinks_.addAll(other.reviewerImageLinks_); + } + onChanged(); + } + if (other.hasMinRating()) { + setMinRating(other.getMinRating()); + } + if (other.hasMaxRating()) { + setMaxRating(other.getMaxRating()); + } + if (other.hasRating()) { + setRating(other.getRating()); + } + if (!other.productNames_.isEmpty()) { + if (productNames_.isEmpty()) { + productNames_ = other.productNames_; + bitField0_ |= 0x00080000; + } else { + ensureProductNamesIsMutable(); + productNames_.addAll(other.productNames_); + } + onChanged(); + } + if (!other.productLinks_.isEmpty()) { + if (productLinks_.isEmpty()) { + productLinks_ = other.productLinks_; + bitField0_ |= 0x00100000; + } else { + ensureProductLinksIsMutable(); + productLinks_.addAll(other.productLinks_); + } + onChanged(); + } + if (!other.asins_.isEmpty()) { + if (asins_.isEmpty()) { + asins_ = other.asins_; + bitField0_ |= 0x00200000; + } else { + ensureAsinsIsMutable(); + asins_.addAll(other.asins_); + } + onChanged(); + } + if (!other.gtins_.isEmpty()) { + if (gtins_.isEmpty()) { + gtins_ = other.gtins_; + bitField0_ |= 0x00400000; + } else { + ensureGtinsIsMutable(); + gtins_.addAll(other.gtins_); + } + onChanged(); + } + if (!other.mpns_.isEmpty()) { + if (mpns_.isEmpty()) { + mpns_ = other.mpns_; + bitField0_ |= 0x00800000; + } else { + ensureMpnsIsMutable(); + mpns_.addAll(other.mpns_); + } + onChanged(); + } + if (!other.skus_.isEmpty()) { + if (skus_.isEmpty()) { + skus_ = other.skus_; + bitField0_ |= 0x01000000; + } else { + ensureSkusIsMutable(); + skus_.addAll(other.skus_); + } + onChanged(); + } + if (!other.brands_.isEmpty()) { + if (brands_.isEmpty()) { + brands_ = other.brands_; + bitField0_ |= 0x02000000; + } else { + ensureBrandsIsMutable(); + brands_.addAll(other.brands_); + } + onChanged(); + } + if (other.hasIsSpam()) { + setIsSpam(other.getIsSpam()); + } + if (other.hasIsVerifiedPurchase()) { + setIsVerifiedPurchase(other.getIsVerifiedPurchase()); + } + if (other.hasIsIncentivizedReview()) { + setIsIncentivizedReview(other.getIsIncentivizedReview()); + } + if (other.collectionMethod_ != 0) { + setCollectionMethodValue(other.getCollectionMethodValue()); + } + if (!other.getTransactionId().isEmpty()) { + transactionId_ = other.transactionId_; + bitField0_ |= 0x40000000; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + aggregatorName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + subclientName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + publisherName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + publisherFavicon_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + reviewerId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: + { + reviewerIsAnonymous_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + reviewerUsername_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + reviewLanguage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 74: + { + reviewCountry_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 74 + case 82: + { + input.readMessage( + internalGetReviewTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProsIsMutable(); + pros_.add(s); + break; + } // case 106 + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureConsIsMutable(); + cons_.add(s); + break; + } // case 114 + case 122: + { + input.readMessage( + internalGetReviewLinkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 122 + case 130: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReviewerImageLinksIsMutable(); + reviewerImageLinks_.add(s); + break; + } // case 130 + case 136: + { + minRating_ = input.readInt64(); + bitField0_ |= 0x00010000; + break; + } // case 136 + case 144: + { + maxRating_ = input.readInt64(); + bitField0_ |= 0x00020000; + break; + } // case 144 + case 153: + { + rating_ = input.readDouble(); + bitField0_ |= 0x00040000; + break; + } // case 153 + case 162: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProductNamesIsMutable(); + productNames_.add(s); + break; + } // case 162 + case 170: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureProductLinksIsMutable(); + productLinks_.add(s); + break; + } // case 170 + case 178: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAsinsIsMutable(); + asins_.add(s); + break; + } // case 178 + case 186: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureGtinsIsMutable(); + gtins_.add(s); + break; + } // case 186 + case 194: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMpnsIsMutable(); + mpns_.add(s); + break; + } // case 194 + case 202: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSkusIsMutable(); + skus_.add(s); + break; + } // case 202 + case 210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureBrandsIsMutable(); + brands_.add(s); + break; + } // case 210 + case 216: + { + isSpam_ = input.readBool(); + bitField0_ |= 0x04000000; + break; + } // case 216 + case 224: + { + collectionMethod_ = input.readEnum(); + bitField0_ |= 0x20000000; + break; + } // case 224 + case 234: + { + transactionId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x40000000; + break; + } // case 234 + case 240: + { + isVerifiedPurchase_ = input.readBool(); + bitField0_ |= 0x08000000; + break; + } // case 240 + case 248: + { + isIncentivizedReview_ = input.readBool(); + bitField0_ |= 0x10000000; + break; + } // case 248 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object aggregatorName_ = ""; + + /** + * + * + *
+     * Optional. The name of the aggregator of the product reviews.
+     *
+     * A publisher may use a reviews aggregator to manage reviews and provide
+     * the feeds. This element indicates the use of an aggregator and contains
+     * information about the aggregator.
+     * 
+ * + * optional string aggregator_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the aggregatorName field is set. + */ + public boolean hasAggregatorName() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Optional. The name of the aggregator of the product reviews.
+     *
+     * A publisher may use a reviews aggregator to manage reviews and provide
+     * the feeds. This element indicates the use of an aggregator and contains
+     * information about the aggregator.
+     * 
+ * + * optional string aggregator_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The aggregatorName. + */ + public java.lang.String getAggregatorName() { + java.lang.Object ref = aggregatorName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + aggregatorName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the aggregator of the product reviews.
+     *
+     * A publisher may use a reviews aggregator to manage reviews and provide
+     * the feeds. This element indicates the use of an aggregator and contains
+     * information about the aggregator.
+     * 
+ * + * optional string aggregator_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for aggregatorName. + */ + public com.google.protobuf.ByteString getAggregatorNameBytes() { + java.lang.Object ref = aggregatorName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + aggregatorName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the aggregator of the product reviews.
+     *
+     * A publisher may use a reviews aggregator to manage reviews and provide
+     * the feeds. This element indicates the use of an aggregator and contains
+     * information about the aggregator.
+     * 
+ * + * optional string aggregator_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The aggregatorName to set. + * @return This builder for chaining. + */ + public Builder setAggregatorName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + aggregatorName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the aggregator of the product reviews.
+     *
+     * A publisher may use a reviews aggregator to manage reviews and provide
+     * the feeds. This element indicates the use of an aggregator and contains
+     * information about the aggregator.
+     * 
+ * + * optional string aggregator_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAggregatorName() { + aggregatorName_ = getDefaultInstance().getAggregatorName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the aggregator of the product reviews.
+     *
+     * A publisher may use a reviews aggregator to manage reviews and provide
+     * the feeds. This element indicates the use of an aggregator and contains
+     * information about the aggregator.
+     * 
+ * + * optional string aggregator_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for aggregatorName to set. + * @return This builder for chaining. + */ + public Builder setAggregatorNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + aggregatorName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object subclientName_ = ""; + + /** + * + * + *
+     * Optional. The name of the subclient of the product reviews.
+     *
+     * The subclient is an identifier of the product review source.
+     * It should be equivalent to the directory provided in the file data source
+     * path.
+     * 
+ * + * optional string subclient_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the subclientName field is set. + */ + public boolean hasSubclientName() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Optional. The name of the subclient of the product reviews.
+     *
+     * The subclient is an identifier of the product review source.
+     * It should be equivalent to the directory provided in the file data source
+     * path.
+     * 
+ * + * optional string subclient_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subclientName. + */ + public java.lang.String getSubclientName() { + java.lang.Object ref = subclientName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + subclientName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the subclient of the product reviews.
+     *
+     * The subclient is an identifier of the product review source.
+     * It should be equivalent to the directory provided in the file data source
+     * path.
+     * 
+ * + * optional string subclient_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subclientName. + */ + public com.google.protobuf.ByteString getSubclientNameBytes() { + java.lang.Object ref = subclientName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + subclientName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the subclient of the product reviews.
+     *
+     * The subclient is an identifier of the product review source.
+     * It should be equivalent to the directory provided in the file data source
+     * path.
+     * 
+ * + * optional string subclient_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The subclientName to set. + * @return This builder for chaining. + */ + public Builder setSubclientName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + subclientName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the subclient of the product reviews.
+     *
+     * The subclient is an identifier of the product review source.
+     * It should be equivalent to the directory provided in the file data source
+     * path.
+     * 
+ * + * optional string subclient_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSubclientName() { + subclientName_ = getDefaultInstance().getSubclientName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the subclient of the product reviews.
+     *
+     * The subclient is an identifier of the product review source.
+     * It should be equivalent to the directory provided in the file data source
+     * path.
+     * 
+ * + * optional string subclient_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for subclientName to set. + * @return This builder for chaining. + */ + public Builder setSubclientNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + subclientName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object publisherName_ = ""; + + /** + * + * + *
+     * Optional. The name of the publisher of the product reviews.
+     *
+     * The information about the publisher, which may be a retailer,
+     * manufacturer, reviews service company, or any entity that publishes
+     * product reviews.
+     * 
+ * + * optional string publisher_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the publisherName field is set. + */ + public boolean hasPublisherName() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Optional. The name of the publisher of the product reviews.
+     *
+     * The information about the publisher, which may be a retailer,
+     * manufacturer, reviews service company, or any entity that publishes
+     * product reviews.
+     * 
+ * + * optional string publisher_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The publisherName. + */ + public java.lang.String getPublisherName() { + java.lang.Object ref = publisherName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publisherName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the publisher of the product reviews.
+     *
+     * The information about the publisher, which may be a retailer,
+     * manufacturer, reviews service company, or any entity that publishes
+     * product reviews.
+     * 
+ * + * optional string publisher_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for publisherName. + */ + public com.google.protobuf.ByteString getPublisherNameBytes() { + java.lang.Object ref = publisherName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publisherName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the publisher of the product reviews.
+     *
+     * The information about the publisher, which may be a retailer,
+     * manufacturer, reviews service company, or any entity that publishes
+     * product reviews.
+     * 
+ * + * optional string publisher_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The publisherName to set. + * @return This builder for chaining. + */ + public Builder setPublisherName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + publisherName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the publisher of the product reviews.
+     *
+     * The information about the publisher, which may be a retailer,
+     * manufacturer, reviews service company, or any entity that publishes
+     * product reviews.
+     * 
+ * + * optional string publisher_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPublisherName() { + publisherName_ = getDefaultInstance().getPublisherName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the publisher of the product reviews.
+     *
+     * The information about the publisher, which may be a retailer,
+     * manufacturer, reviews service company, or any entity that publishes
+     * product reviews.
+     * 
+ * + * optional string publisher_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for publisherName to set. + * @return This builder for chaining. + */ + public Builder setPublisherNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + publisherName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object publisherFavicon_ = ""; + + /** + * + * + *
+     * Optional. A link to the company favicon of the publisher. The image
+     * dimensions should be favicon size: 16x16 pixels. The image format should be
+     * GIF, JPG or PNG.
+     * 
+ * + * optional string publisher_favicon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the publisherFavicon field is set. + */ + public boolean hasPublisherFavicon() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. A link to the company favicon of the publisher. The image
+     * dimensions should be favicon size: 16x16 pixels. The image format should be
+     * GIF, JPG or PNG.
+     * 
+ * + * optional string publisher_favicon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The publisherFavicon. + */ + public java.lang.String getPublisherFavicon() { + java.lang.Object ref = publisherFavicon_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publisherFavicon_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A link to the company favicon of the publisher. The image
+     * dimensions should be favicon size: 16x16 pixels. The image format should be
+     * GIF, JPG or PNG.
+     * 
+ * + * optional string publisher_favicon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for publisherFavicon. + */ + public com.google.protobuf.ByteString getPublisherFaviconBytes() { + java.lang.Object ref = publisherFavicon_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publisherFavicon_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A link to the company favicon of the publisher. The image
+     * dimensions should be favicon size: 16x16 pixels. The image format should be
+     * GIF, JPG or PNG.
+     * 
+ * + * optional string publisher_favicon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The publisherFavicon to set. + * @return This builder for chaining. + */ + public Builder setPublisherFavicon(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + publisherFavicon_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A link to the company favicon of the publisher. The image
+     * dimensions should be favicon size: 16x16 pixels. The image format should be
+     * GIF, JPG or PNG.
+     * 
+ * + * optional string publisher_favicon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPublisherFavicon() { + publisherFavicon_ = getDefaultInstance().getPublisherFavicon(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A link to the company favicon of the publisher. The image
+     * dimensions should be favicon size: 16x16 pixels. The image format should be
+     * GIF, JPG or PNG.
+     * 
+ * + * optional string publisher_favicon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for publisherFavicon to set. + * @return This builder for chaining. + */ + public Builder setPublisherFaviconBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + publisherFavicon_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object reviewerId_ = ""; + + /** + * + * + *
+     * Optional. The author of the product review.
+     *
+     * A permanent, unique identifier for the author of the review in the
+     * publisher's system.
+     * 
+ * + * optional string reviewer_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewerId field is set. + */ + public boolean hasReviewerId() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Optional. The author of the product review.
+     *
+     * A permanent, unique identifier for the author of the review in the
+     * publisher's system.
+     * 
+ * + * optional string reviewer_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewerId. + */ + public java.lang.String getReviewerId() { + java.lang.Object ref = reviewerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reviewerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The author of the product review.
+     *
+     * A permanent, unique identifier for the author of the review in the
+     * publisher's system.
+     * 
+ * + * optional string reviewer_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for reviewerId. + */ + public com.google.protobuf.ByteString getReviewerIdBytes() { + java.lang.Object ref = reviewerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reviewerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The author of the product review.
+     *
+     * A permanent, unique identifier for the author of the review in the
+     * publisher's system.
+     * 
+ * + * optional string reviewer_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The reviewerId to set. + * @return This builder for chaining. + */ + public Builder setReviewerId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + reviewerId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The author of the product review.
+     *
+     * A permanent, unique identifier for the author of the review in the
+     * publisher's system.
+     * 
+ * + * optional string reviewer_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReviewerId() { + reviewerId_ = getDefaultInstance().getReviewerId(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The author of the product review.
+     *
+     * A permanent, unique identifier for the author of the review in the
+     * publisher's system.
+     * 
+ * + * optional string reviewer_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for reviewerId to set. + * @return This builder for chaining. + */ + public Builder setReviewerIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + reviewerId_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private boolean reviewerIsAnonymous_; + + /** + * + * + *
+     * Optional. Set to true if the reviewer should remain anonymous.
+     * 
+ * + * optional bool reviewer_is_anonymous = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the reviewerIsAnonymous field is set. + */ + @java.lang.Override + public boolean hasReviewerIsAnonymous() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * Optional. Set to true if the reviewer should remain anonymous.
+     * 
+ * + * optional bool reviewer_is_anonymous = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The reviewerIsAnonymous. + */ + @java.lang.Override + public boolean getReviewerIsAnonymous() { + return reviewerIsAnonymous_; + } + + /** + * + * + *
+     * Optional. Set to true if the reviewer should remain anonymous.
+     * 
+ * + * optional bool reviewer_is_anonymous = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The reviewerIsAnonymous to set. + * @return This builder for chaining. + */ + public Builder setReviewerIsAnonymous(boolean value) { + + reviewerIsAnonymous_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Set to true if the reviewer should remain anonymous.
+     * 
+ * + * optional bool reviewer_is_anonymous = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearReviewerIsAnonymous() { + bitField0_ = (bitField0_ & ~0x00000020); + reviewerIsAnonymous_ = false; + onChanged(); + return this; + } + + private java.lang.Object reviewerUsername_ = ""; + + /** + * + * + *
+     * Optional. The name of the reviewer of the product review.
+     * 
+ * + * optional string reviewer_username = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewerUsername field is set. + */ + public boolean hasReviewerUsername() { + return ((bitField0_ & 0x00000040) != 0); + } + + /** + * + * + *
+     * Optional. The name of the reviewer of the product review.
+     * 
+ * + * optional string reviewer_username = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewerUsername. + */ + public java.lang.String getReviewerUsername() { + java.lang.Object ref = reviewerUsername_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reviewerUsername_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the reviewer of the product review.
+     * 
+ * + * optional string reviewer_username = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for reviewerUsername. + */ + public com.google.protobuf.ByteString getReviewerUsernameBytes() { + java.lang.Object ref = reviewerUsername_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reviewerUsername_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The name of the reviewer of the product review.
+     * 
+ * + * optional string reviewer_username = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The reviewerUsername to set. + * @return This builder for chaining. + */ + public Builder setReviewerUsername(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + reviewerUsername_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the reviewer of the product review.
+     * 
+ * + * optional string reviewer_username = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReviewerUsername() { + reviewerUsername_ = getDefaultInstance().getReviewerUsername(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The name of the reviewer of the product review.
+     * 
+ * + * optional string reviewer_username = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for reviewerUsername to set. + * @return This builder for chaining. + */ + public Builder setReviewerUsernameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + reviewerUsername_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object reviewLanguage_ = ""; + + /** + * + * + *
+     * Optional. The language of the review defined by BCP-47 language code.
+     * 
+ * + * optional string review_language = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewLanguage field is set. + */ + public boolean hasReviewLanguage() { + return ((bitField0_ & 0x00000080) != 0); + } + + /** + * + * + *
+     * Optional. The language of the review defined by BCP-47 language code.
+     * 
+ * + * optional string review_language = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewLanguage. + */ + public java.lang.String getReviewLanguage() { + java.lang.Object ref = reviewLanguage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reviewLanguage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The language of the review defined by BCP-47 language code.
+     * 
+ * + * optional string review_language = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for reviewLanguage. + */ + public com.google.protobuf.ByteString getReviewLanguageBytes() { + java.lang.Object ref = reviewLanguage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reviewLanguage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The language of the review defined by BCP-47 language code.
+     * 
+ * + * optional string review_language = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The reviewLanguage to set. + * @return This builder for chaining. + */ + public Builder setReviewLanguage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + reviewLanguage_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The language of the review defined by BCP-47 language code.
+     * 
+ * + * optional string review_language = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReviewLanguage() { + reviewLanguage_ = getDefaultInstance().getReviewLanguage(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The language of the review defined by BCP-47 language code.
+     * 
+ * + * optional string review_language = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for reviewLanguage to set. + * @return This builder for chaining. + */ + public Builder setReviewLanguageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + reviewLanguage_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private java.lang.Object reviewCountry_ = ""; + + /** + * + * + *
+     * Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country
+     * Code.
+     * 
+ * + * optional string review_country = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewCountry field is set. + */ + public boolean hasReviewCountry() { + return ((bitField0_ & 0x00000100) != 0); + } + + /** + * + * + *
+     * Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country
+     * Code.
+     * 
+ * + * optional string review_country = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewCountry. + */ + public java.lang.String getReviewCountry() { + java.lang.Object ref = reviewCountry_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + reviewCountry_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country
+     * Code.
+     * 
+ * + * optional string review_country = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for reviewCountry. + */ + public com.google.protobuf.ByteString getReviewCountryBytes() { + java.lang.Object ref = reviewCountry_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + reviewCountry_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country
+     * Code.
+     * 
+ * + * optional string review_country = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The reviewCountry to set. + * @return This builder for chaining. + */ + public Builder setReviewCountry(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + reviewCountry_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country
+     * Code.
+     * 
+ * + * optional string review_country = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReviewCountry() { + reviewCountry_ = getDefaultInstance().getReviewCountry(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country
+     * Code.
+     * 
+ * + * optional string review_country = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for reviewCountry to set. + * @return This builder for chaining. + */ + public Builder setReviewCountryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + reviewCountry_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp reviewTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + reviewTimeBuilder_; + + /** + * + * + *
+     * Required. The timestamp indicating when the review was written.
+     * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reviewTime field is set. + */ + public boolean hasReviewTime() { + return ((bitField0_ & 0x00000200) != 0); + } + + /** + * + * + *
+     * Required. The timestamp indicating when the review was written.
+     * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reviewTime. + */ + public com.google.protobuf.Timestamp getReviewTime() { + if (reviewTimeBuilder_ == null) { + return reviewTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : reviewTime_; + } else { + return reviewTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The timestamp indicating when the review was written.
+     * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReviewTime(com.google.protobuf.Timestamp value) { + if (reviewTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reviewTime_ = value; + } else { + reviewTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The timestamp indicating when the review was written.
+     * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setReviewTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (reviewTimeBuilder_ == null) { + reviewTime_ = builderForValue.build(); + } else { + reviewTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The timestamp indicating when the review was written.
+     * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeReviewTime(com.google.protobuf.Timestamp value) { + if (reviewTimeBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0) + && reviewTime_ != null + && reviewTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getReviewTimeBuilder().mergeFrom(value); + } else { + reviewTime_ = value; + } + } else { + reviewTimeBuilder_.mergeFrom(value); + } + if (reviewTime_ != null) { + bitField0_ |= 0x00000200; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The timestamp indicating when the review was written.
+     * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearReviewTime() { + bitField0_ = (bitField0_ & ~0x00000200); + reviewTime_ = null; + if (reviewTimeBuilder_ != null) { + reviewTimeBuilder_.dispose(); + reviewTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The timestamp indicating when the review was written.
+     * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.Timestamp.Builder getReviewTimeBuilder() { + bitField0_ |= 0x00000200; + onChanged(); + return internalGetReviewTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The timestamp indicating when the review was written.
+     * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.TimestampOrBuilder getReviewTimeOrBuilder() { + if (reviewTimeBuilder_ != null) { + return reviewTimeBuilder_.getMessageOrBuilder(); + } else { + return reviewTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : reviewTime_; + } + } + + /** + * + * + *
+     * Required. The timestamp indicating when the review was written.
+     * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetReviewTimeFieldBuilder() { + if (reviewTimeBuilder_ == null) { + reviewTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getReviewTime(), getParentForChildren(), isClean()); + reviewTime_ = null; + } + return reviewTimeBuilder_; + } + + private java.lang.Object title_ = ""; + + /** + * + * + *
+     * Optional. The title of the review.
+     * 
+ * + * optional string title = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the title field is set. + */ + public boolean hasTitle() { + return ((bitField0_ & 0x00000400) != 0); + } + + /** + * + * + *
+     * Optional. The title of the review.
+     * 
+ * + * optional string title = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The title of the review.
+     * 
+ * + * optional string title = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The title of the review.
+     * 
+ * + * optional string title = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + title_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The title of the review.
+     * 
+ * + * optional string title = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The title of the review.
+     * 
+ * + * optional string title = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + + /** + * + * + *
+     * Optional. The content of the review. If empty, the content might still get
+     * populated from pros and cons.
+     * 
+ * + * optional string content = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the content field is set. + */ + public boolean hasContent() { + return ((bitField0_ & 0x00000800) != 0); + } + + /** + * + * + *
+     * Optional. The content of the review. If empty, the content might still get
+     * populated from pros and cons.
+     * 
+ * + * optional string content = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The content of the review. If empty, the content might still get
+     * populated from pros and cons.
+     * 
+ * + * optional string content = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The content of the review. If empty, the content might still get
+     * populated from pros and cons.
+     * 
+ * + * optional string content = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + content_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The content of the review. If empty, the content might still get
+     * populated from pros and cons.
+     * 
+ * + * optional string content = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + content_ = getDefaultInstance().getContent(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The content of the review. If empty, the content might still get
+     * populated from pros and cons.
+     * 
+ * + * optional string content = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + content_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList pros_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureProsIsMutable() { + if (!pros_.isModifiable()) { + pros_ = new com.google.protobuf.LazyStringArrayList(pros_); + } + bitField0_ |= 0x00001000; + } + + /** + * + * + *
+     * Optional. Contains the advantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+     * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the pros. + */ + public com.google.protobuf.ProtocolStringList getProsList() { + pros_.makeImmutable(); + return pros_; + } + + /** + * + * + *
+     * Optional. Contains the advantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+     * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of pros. + */ + public int getProsCount() { + return pros_.size(); + } + + /** + * + * + *
+     * Optional. Contains the advantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+     * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The pros at the given index. + */ + public java.lang.String getPros(int index) { + return pros_.get(index); + } + + /** + * + * + *
+     * Optional. Contains the advantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+     * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the pros at the given index. + */ + public com.google.protobuf.ByteString getProsBytes(int index) { + return pros_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Contains the advantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+     * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The pros to set. + * @return This builder for chaining. + */ + public Builder setPros(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProsIsMutable(); + pros_.set(index, value); + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains the advantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+     * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pros to add. + * @return This builder for chaining. + */ + public Builder addPros(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProsIsMutable(); + pros_.add(value); + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains the advantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+     * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The pros to add. + * @return This builder for chaining. + */ + public Builder addAllPros(java.lang.Iterable values) { + ensureProsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pros_); + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains the advantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+     * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPros() { + pros_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains the advantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+     * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the pros to add. + * @return This builder for chaining. + */ + public Builder addProsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProsIsMutable(); + pros_.add(value); + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList cons_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureConsIsMutable() { + if (!cons_.isModifiable()) { + cons_ = new com.google.protobuf.LazyStringArrayList(cons_); + } + bitField0_ |= 0x00002000; + } + + /** + * + * + *
+     * Optional. Contains the disadvantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "con:" unless it was written by the reviewer.
+     * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the cons. + */ + public com.google.protobuf.ProtocolStringList getConsList() { + cons_.makeImmutable(); + return cons_; + } + + /** + * + * + *
+     * Optional. Contains the disadvantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "con:" unless it was written by the reviewer.
+     * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of cons. + */ + public int getConsCount() { + return cons_.size(); + } + + /** + * + * + *
+     * Optional. Contains the disadvantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "con:" unless it was written by the reviewer.
+     * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The cons at the given index. + */ + public java.lang.String getCons(int index) { + return cons_.get(index); + } + + /** + * + * + *
+     * Optional. Contains the disadvantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "con:" unless it was written by the reviewer.
+     * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the cons at the given index. + */ + public com.google.protobuf.ByteString getConsBytes(int index) { + return cons_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Contains the disadvantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "con:" unless it was written by the reviewer.
+     * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The cons to set. + * @return This builder for chaining. + */ + public Builder setCons(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsIsMutable(); + cons_.set(index, value); + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains the disadvantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "con:" unless it was written by the reviewer.
+     * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The cons to add. + * @return This builder for chaining. + */ + public Builder addCons(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureConsIsMutable(); + cons_.add(value); + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains the disadvantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "con:" unless it was written by the reviewer.
+     * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The cons to add. + * @return This builder for chaining. + */ + public Builder addAllCons(java.lang.Iterable values) { + ensureConsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cons_); + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains the disadvantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "con:" unless it was written by the reviewer.
+     * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearCons() { + cons_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains the disadvantages based on the opinion of the reviewer.
+     * Omit boilerplate text like "con:" unless it was written by the reviewer.
+     * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the cons to add. + * @return This builder for chaining. + */ + public Builder addConsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureConsIsMutable(); + cons_.add(value); + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink reviewLink_; + private com.google.protobuf.SingleFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLinkOrBuilder> + reviewLinkBuilder_; + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the reviewLink field is set. + */ + public boolean hasReviewLink() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The reviewLink. + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + getReviewLink() { + if (reviewLinkBuilder_ == null) { + return reviewLink_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + .getDefaultInstance() + : reviewLink_; + } else { + return reviewLinkBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReviewLink( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink value) { + if (reviewLinkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + reviewLink_ = value; + } else { + reviewLinkBuilder_.setMessage(value); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setReviewLink( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Builder + builderForValue) { + if (reviewLinkBuilder_ == null) { + reviewLink_ = builderForValue.build(); + } else { + reviewLinkBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeReviewLink( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink value) { + if (reviewLinkBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0) + && reviewLink_ != null + && reviewLink_ + != com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + .getDefaultInstance()) { + getReviewLinkBuilder().mergeFrom(value); + } else { + reviewLink_ = value; + } + } else { + reviewLinkBuilder_.mergeFrom(value); + } + if (reviewLink_ != null) { + bitField0_ |= 0x00004000; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearReviewLink() { + bitField0_ = (bitField0_ & ~0x00004000); + reviewLink_ = null; + if (reviewLinkBuilder_ != null) { + reviewLinkBuilder_.dispose(); + reviewLinkBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Builder + getReviewLinkBuilder() { + bitField0_ |= 0x00004000; + onChanged(); + return internalGetReviewLinkFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLinkOrBuilder + getReviewLinkOrBuilder() { + if (reviewLinkBuilder_ != null) { + return reviewLinkBuilder_.getMessageOrBuilder(); + } else { + return reviewLink_ == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink + .getDefaultInstance() + : reviewLink_; + } + } + + /** + * + * + *
+     * Optional. The URI of the review landing page.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLinkOrBuilder> + internalGetReviewLinkFieldBuilder() { + if (reviewLinkBuilder_ == null) { + reviewLinkBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes + .ReviewLinkOrBuilder>(getReviewLink(), getParentForChildren(), isClean()); + reviewLink_ = null; + } + return reviewLinkBuilder_; + } + + private com.google.protobuf.LazyStringArrayList reviewerImageLinks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReviewerImageLinksIsMutable() { + if (!reviewerImageLinks_.isModifiable()) { + reviewerImageLinks_ = new com.google.protobuf.LazyStringArrayList(reviewerImageLinks_); + } + bitField0_ |= 0x00008000; + } + + /** + * + * + *
+     * Optional. A URI to an image of the reviewed product created by the review
+     * author. The URI does not have to end with an image file extension.
+     * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the reviewerImageLinks. + */ + public com.google.protobuf.ProtocolStringList getReviewerImageLinksList() { + reviewerImageLinks_.makeImmutable(); + return reviewerImageLinks_; + } + + /** + * + * + *
+     * Optional. A URI to an image of the reviewed product created by the review
+     * author. The URI does not have to end with an image file extension.
+     * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of reviewerImageLinks. + */ + public int getReviewerImageLinksCount() { + return reviewerImageLinks_.size(); + } + + /** + * + * + *
+     * Optional. A URI to an image of the reviewed product created by the review
+     * author. The URI does not have to end with an image file extension.
+     * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The reviewerImageLinks at the given index. + */ + public java.lang.String getReviewerImageLinks(int index) { + return reviewerImageLinks_.get(index); + } + + /** + * + * + *
+     * Optional. A URI to an image of the reviewed product created by the review
+     * author. The URI does not have to end with an image file extension.
+     * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the reviewerImageLinks at the given index. + */ + public com.google.protobuf.ByteString getReviewerImageLinksBytes(int index) { + return reviewerImageLinks_.getByteString(index); + } + + /** + * + * + *
+     * Optional. A URI to an image of the reviewed product created by the review
+     * author. The URI does not have to end with an image file extension.
+     * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The reviewerImageLinks to set. + * @return This builder for chaining. + */ + public Builder setReviewerImageLinks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReviewerImageLinksIsMutable(); + reviewerImageLinks_.set(index, value); + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A URI to an image of the reviewed product created by the review
+     * author. The URI does not have to end with an image file extension.
+     * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The reviewerImageLinks to add. + * @return This builder for chaining. + */ + public Builder addReviewerImageLinks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReviewerImageLinksIsMutable(); + reviewerImageLinks_.add(value); + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A URI to an image of the reviewed product created by the review
+     * author. The URI does not have to end with an image file extension.
+     * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The reviewerImageLinks to add. + * @return This builder for chaining. + */ + public Builder addAllReviewerImageLinks(java.lang.Iterable values) { + ensureReviewerImageLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reviewerImageLinks_); + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A URI to an image of the reviewed product created by the review
+     * author. The URI does not have to end with an image file extension.
+     * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearReviewerImageLinks() { + reviewerImageLinks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00008000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A URI to an image of the reviewed product created by the review
+     * author. The URI does not have to end with an image file extension.
+     * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the reviewerImageLinks to add. + * @return This builder for chaining. + */ + public Builder addReviewerImageLinksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReviewerImageLinksIsMutable(); + reviewerImageLinks_.add(value); + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private long minRating_; + + /** + * + * + *
+     * Optional. Contains the ratings associated with the review.
+     * The minimum possible number for the rating. This should be the worst
+     * possible rating and should not be a value for no rating.
+     * 
+ * + * optional int64 min_rating = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minRating field is set. + */ + @java.lang.Override + public boolean hasMinRating() { + return ((bitField0_ & 0x00010000) != 0); + } + + /** + * + * + *
+     * Optional. Contains the ratings associated with the review.
+     * The minimum possible number for the rating. This should be the worst
+     * possible rating and should not be a value for no rating.
+     * 
+ * + * optional int64 min_rating = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minRating. + */ + @java.lang.Override + public long getMinRating() { + return minRating_; + } + + /** + * + * + *
+     * Optional. Contains the ratings associated with the review.
+     * The minimum possible number for the rating. This should be the worst
+     * possible rating and should not be a value for no rating.
+     * 
+ * + * optional int64 min_rating = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The minRating to set. + * @return This builder for chaining. + */ + public Builder setMinRating(long value) { + + minRating_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains the ratings associated with the review.
+     * The minimum possible number for the rating. This should be the worst
+     * possible rating and should not be a value for no rating.
+     * 
+ * + * optional int64 min_rating = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMinRating() { + bitField0_ = (bitField0_ & ~0x00010000); + minRating_ = 0L; + onChanged(); + return this; + } + + private long maxRating_; + + /** + * + * + *
+     * Optional. The maximum possible number for the rating. The value of the max
+     * rating must be greater than the value of the min attribute.
+     * 
+ * + * optional int64 max_rating = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the maxRating field is set. + */ + @java.lang.Override + public boolean hasMaxRating() { + return ((bitField0_ & 0x00020000) != 0); + } + + /** + * + * + *
+     * Optional. The maximum possible number for the rating. The value of the max
+     * rating must be greater than the value of the min attribute.
+     * 
+ * + * optional int64 max_rating = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxRating. + */ + @java.lang.Override + public long getMaxRating() { + return maxRating_; + } + + /** + * + * + *
+     * Optional. The maximum possible number for the rating. The value of the max
+     * rating must be greater than the value of the min attribute.
+     * 
+ * + * optional int64 max_rating = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maxRating to set. + * @return This builder for chaining. + */ + public Builder setMaxRating(long value) { + + maxRating_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The maximum possible number for the rating. The value of the max
+     * rating must be greater than the value of the min attribute.
+     * 
+ * + * optional int64 max_rating = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMaxRating() { + bitField0_ = (bitField0_ & ~0x00020000); + maxRating_ = 0L; + onChanged(); + return this; + } + + private double rating_; + + /** + * + * + *
+     * Optional. The reviewer's overall rating of the product.
+     * 
+ * + * optional double rating = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the rating field is set. + */ + @java.lang.Override + public boolean hasRating() { + return ((bitField0_ & 0x00040000) != 0); + } + + /** + * + * + *
+     * Optional. The reviewer's overall rating of the product.
+     * 
+ * + * optional double rating = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rating. + */ + @java.lang.Override + public double getRating() { + return rating_; + } + + /** + * + * + *
+     * Optional. The reviewer's overall rating of the product.
+     * 
+ * + * optional double rating = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The rating to set. + * @return This builder for chaining. + */ + public Builder setRating(double value) { + + rating_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The reviewer's overall rating of the product.
+     * 
+ * + * optional double rating = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRating() { + bitField0_ = (bitField0_ & ~0x00040000); + rating_ = 0D; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList productNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureProductNamesIsMutable() { + if (!productNames_.isModifiable()) { + productNames_ = new com.google.protobuf.LazyStringArrayList(productNames_); + } + bitField0_ |= 0x00080000; + } + + /** + * + * + *
+     * Optional. Descriptive name of a product.
+     * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the productNames. + */ + public com.google.protobuf.ProtocolStringList getProductNamesList() { + productNames_.makeImmutable(); + return productNames_; + } + + /** + * + * + *
+     * Optional. Descriptive name of a product.
+     * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of productNames. + */ + public int getProductNamesCount() { + return productNames_.size(); + } + + /** + * + * + *
+     * Optional. Descriptive name of a product.
+     * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The productNames at the given index. + */ + public java.lang.String getProductNames(int index) { + return productNames_.get(index); + } + + /** + * + * + *
+     * Optional. Descriptive name of a product.
+     * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the productNames at the given index. + */ + public com.google.protobuf.ByteString getProductNamesBytes(int index) { + return productNames_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Descriptive name of a product.
+     * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The productNames to set. + * @return This builder for chaining. + */ + public Builder setProductNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductNamesIsMutable(); + productNames_.set(index, value); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Descriptive name of a product.
+     * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The productNames to add. + * @return This builder for chaining. + */ + public Builder addProductNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductNamesIsMutable(); + productNames_.add(value); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Descriptive name of a product.
+     * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The productNames to add. + * @return This builder for chaining. + */ + public Builder addAllProductNames(java.lang.Iterable values) { + ensureProductNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, productNames_); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Descriptive name of a product.
+     * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearProductNames() { + productNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00080000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Descriptive name of a product.
+     * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the productNames to add. + * @return This builder for chaining. + */ + public Builder addProductNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProductNamesIsMutable(); + productNames_.add(value); + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList productLinks_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureProductLinksIsMutable() { + if (!productLinks_.isModifiable()) { + productLinks_ = new com.google.protobuf.LazyStringArrayList(productLinks_); + } + bitField0_ |= 0x00100000; + } + + /** + * + * + *
+     * Optional. The URI of the product. This URI can have the same value as the
+     * `review_link` element, if the review URI and the product URI are the
+     * same.
+     * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the productLinks. + */ + public com.google.protobuf.ProtocolStringList getProductLinksList() { + productLinks_.makeImmutable(); + return productLinks_; + } + + /** + * + * + *
+     * Optional. The URI of the product. This URI can have the same value as the
+     * `review_link` element, if the review URI and the product URI are the
+     * same.
+     * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of productLinks. + */ + public int getProductLinksCount() { + return productLinks_.size(); + } + + /** + * + * + *
+     * Optional. The URI of the product. This URI can have the same value as the
+     * `review_link` element, if the review URI and the product URI are the
+     * same.
+     * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The productLinks at the given index. + */ + public java.lang.String getProductLinks(int index) { + return productLinks_.get(index); + } + + /** + * + * + *
+     * Optional. The URI of the product. This URI can have the same value as the
+     * `review_link` element, if the review URI and the product URI are the
+     * same.
+     * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the productLinks at the given index. + */ + public com.google.protobuf.ByteString getProductLinksBytes(int index) { + return productLinks_.getByteString(index); + } + + /** + * + * + *
+     * Optional. The URI of the product. This URI can have the same value as the
+     * `review_link` element, if the review URI and the product URI are the
+     * same.
+     * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The productLinks to set. + * @return This builder for chaining. + */ + public Builder setProductLinks(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductLinksIsMutable(); + productLinks_.set(index, value); + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The URI of the product. This URI can have the same value as the
+     * `review_link` element, if the review URI and the product URI are the
+     * same.
+     * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The productLinks to add. + * @return This builder for chaining. + */ + public Builder addProductLinks(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductLinksIsMutable(); + productLinks_.add(value); + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The URI of the product. This URI can have the same value as the
+     * `review_link` element, if the review URI and the product URI are the
+     * same.
+     * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The productLinks to add. + * @return This builder for chaining. + */ + public Builder addAllProductLinks(java.lang.Iterable values) { + ensureProductLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, productLinks_); + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The URI of the product. This URI can have the same value as the
+     * `review_link` element, if the review URI and the product URI are the
+     * same.
+     * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearProductLinks() { + productLinks_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00100000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The URI of the product. This URI can have the same value as the
+     * `review_link` element, if the review URI and the product URI are the
+     * same.
+     * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the productLinks to add. + * @return This builder for chaining. + */ + public Builder addProductLinksBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureProductLinksIsMutable(); + productLinks_.add(value); + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList asins_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAsinsIsMutable() { + if (!asins_.isModifiable()) { + asins_ = new com.google.protobuf.LazyStringArrayList(asins_); + } + bitField0_ |= 0x00200000; + } + + /** + * + * + *
+     * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+     * associated with a product.
+     * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the asins. + */ + public com.google.protobuf.ProtocolStringList getAsinsList() { + asins_.makeImmutable(); + return asins_; + } + + /** + * + * + *
+     * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+     * associated with a product.
+     * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of asins. + */ + public int getAsinsCount() { + return asins_.size(); + } + + /** + * + * + *
+     * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+     * associated with a product.
+     * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The asins at the given index. + */ + public java.lang.String getAsins(int index) { + return asins_.get(index); + } + + /** + * + * + *
+     * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+     * associated with a product.
+     * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the asins at the given index. + */ + public com.google.protobuf.ByteString getAsinsBytes(int index) { + return asins_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+     * associated with a product.
+     * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The asins to set. + * @return This builder for chaining. + */ + public Builder setAsins(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAsinsIsMutable(); + asins_.set(index, value); + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+     * associated with a product.
+     * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The asins to add. + * @return This builder for chaining. + */ + public Builder addAsins(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAsinsIsMutable(); + asins_.add(value); + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+     * associated with a product.
+     * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The asins to add. + * @return This builder for chaining. + */ + public Builder addAllAsins(java.lang.Iterable values) { + ensureAsinsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, asins_); + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+     * associated with a product.
+     * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAsins() { + asins_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00200000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+     * associated with a product.
+     * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the asins to add. + * @return This builder for chaining. + */ + public Builder addAsinsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAsinsIsMutable(); + asins_.add(value); + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList gtins_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureGtinsIsMutable() { + if (!gtins_.isModifiable()) { + gtins_ = new com.google.protobuf.LazyStringArrayList(gtins_); + } + bitField0_ |= 0x00400000; + } + + /** + * + * + *
+     * Optional. Contains GTINs (global trade item numbers) associated with a
+     * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+     * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the gtins. + */ + public com.google.protobuf.ProtocolStringList getGtinsList() { + gtins_.makeImmutable(); + return gtins_; + } + + /** + * + * + *
+     * Optional. Contains GTINs (global trade item numbers) associated with a
+     * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+     * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of gtins. + */ + public int getGtinsCount() { + return gtins_.size(); + } + + /** + * + * + *
+     * Optional. Contains GTINs (global trade item numbers) associated with a
+     * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+     * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The gtins at the given index. + */ + public java.lang.String getGtins(int index) { + return gtins_.get(index); + } + + /** + * + * + *
+     * Optional. Contains GTINs (global trade item numbers) associated with a
+     * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+     * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the gtins at the given index. + */ + public com.google.protobuf.ByteString getGtinsBytes(int index) { + return gtins_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Contains GTINs (global trade item numbers) associated with a
+     * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+     * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The gtins to set. + * @return This builder for chaining. + */ + public Builder setGtins(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGtinsIsMutable(); + gtins_.set(index, value); + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains GTINs (global trade item numbers) associated with a
+     * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+     * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The gtins to add. + * @return This builder for chaining. + */ + public Builder addGtins(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGtinsIsMutable(); + gtins_.add(value); + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains GTINs (global trade item numbers) associated with a
+     * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+     * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The gtins to add. + * @return This builder for chaining. + */ + public Builder addAllGtins(java.lang.Iterable values) { + ensureGtinsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, gtins_); + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains GTINs (global trade item numbers) associated with a
+     * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+     * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearGtins() { + gtins_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00400000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains GTINs (global trade item numbers) associated with a
+     * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+     * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the gtins to add. + * @return This builder for chaining. + */ + public Builder addGtinsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureGtinsIsMutable(); + gtins_.add(value); + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList mpns_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureMpnsIsMutable() { + if (!mpns_.isModifiable()) { + mpns_ = new com.google.protobuf.LazyStringArrayList(mpns_); + } + bitField0_ |= 0x00800000; + } + + /** + * + * + *
+     * Optional. Contains MPNs (manufacturer part numbers) associated with a
+     * product.
+     * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the mpns. + */ + public com.google.protobuf.ProtocolStringList getMpnsList() { + mpns_.makeImmutable(); + return mpns_; + } + + /** + * + * + *
+     * Optional. Contains MPNs (manufacturer part numbers) associated with a
+     * product.
+     * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of mpns. + */ + public int getMpnsCount() { + return mpns_.size(); + } + + /** + * + * + *
+     * Optional. Contains MPNs (manufacturer part numbers) associated with a
+     * product.
+     * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The mpns at the given index. + */ + public java.lang.String getMpns(int index) { + return mpns_.get(index); + } + + /** + * + * + *
+     * Optional. Contains MPNs (manufacturer part numbers) associated with a
+     * product.
+     * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the mpns at the given index. + */ + public com.google.protobuf.ByteString getMpnsBytes(int index) { + return mpns_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Contains MPNs (manufacturer part numbers) associated with a
+     * product.
+     * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The mpns to set. + * @return This builder for chaining. + */ + public Builder setMpns(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMpnsIsMutable(); + mpns_.set(index, value); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains MPNs (manufacturer part numbers) associated with a
+     * product.
+     * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The mpns to add. + * @return This builder for chaining. + */ + public Builder addMpns(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMpnsIsMutable(); + mpns_.add(value); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains MPNs (manufacturer part numbers) associated with a
+     * product.
+     * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The mpns to add. + * @return This builder for chaining. + */ + public Builder addAllMpns(java.lang.Iterable values) { + ensureMpnsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mpns_); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains MPNs (manufacturer part numbers) associated with a
+     * product.
+     * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMpns() { + mpns_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00800000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains MPNs (manufacturer part numbers) associated with a
+     * product.
+     * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the mpns to add. + * @return This builder for chaining. + */ + public Builder addMpnsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureMpnsIsMutable(); + mpns_.add(value); + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList skus_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureSkusIsMutable() { + if (!skus_.isModifiable()) { + skus_ = new com.google.protobuf.LazyStringArrayList(skus_); + } + bitField0_ |= 0x01000000; + } + + /** + * + * + *
+     * Optional. Contains SKUs (stock keeping units) associated with a product.
+     * Often this matches the product Offer Id in the product feed.
+     * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the skus. + */ + public com.google.protobuf.ProtocolStringList getSkusList() { + skus_.makeImmutable(); + return skus_; + } + + /** + * + * + *
+     * Optional. Contains SKUs (stock keeping units) associated with a product.
+     * Often this matches the product Offer Id in the product feed.
+     * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of skus. + */ + public int getSkusCount() { + return skus_.size(); + } + + /** + * + * + *
+     * Optional. Contains SKUs (stock keeping units) associated with a product.
+     * Often this matches the product Offer Id in the product feed.
+     * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The skus at the given index. + */ + public java.lang.String getSkus(int index) { + return skus_.get(index); + } + + /** + * + * + *
+     * Optional. Contains SKUs (stock keeping units) associated with a product.
+     * Often this matches the product Offer Id in the product feed.
+     * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the skus at the given index. + */ + public com.google.protobuf.ByteString getSkusBytes(int index) { + return skus_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Contains SKUs (stock keeping units) associated with a product.
+     * Often this matches the product Offer Id in the product feed.
+     * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The skus to set. + * @return This builder for chaining. + */ + public Builder setSkus(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkusIsMutable(); + skus_.set(index, value); + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains SKUs (stock keeping units) associated with a product.
+     * Often this matches the product Offer Id in the product feed.
+     * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The skus to add. + * @return This builder for chaining. + */ + public Builder addSkus(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkusIsMutable(); + skus_.add(value); + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains SKUs (stock keeping units) associated with a product.
+     * Often this matches the product Offer Id in the product feed.
+     * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The skus to add. + * @return This builder for chaining. + */ + public Builder addAllSkus(java.lang.Iterable values) { + ensureSkusIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, skus_); + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains SKUs (stock keeping units) associated with a product.
+     * Often this matches the product Offer Id in the product feed.
+     * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSkus() { + skus_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x01000000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains SKUs (stock keeping units) associated with a product.
+     * Often this matches the product Offer Id in the product feed.
+     * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the skus to add. + * @return This builder for chaining. + */ + public Builder addSkusBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureSkusIsMutable(); + skus_.add(value); + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList brands_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureBrandsIsMutable() { + if (!brands_.isModifiable()) { + brands_ = new com.google.protobuf.LazyStringArrayList(brands_); + } + bitField0_ |= 0x02000000; + } + + /** + * + * + *
+     * Optional. Contains brand names associated with a product.
+     * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the brands. + */ + public com.google.protobuf.ProtocolStringList getBrandsList() { + brands_.makeImmutable(); + return brands_; + } + + /** + * + * + *
+     * Optional. Contains brand names associated with a product.
+     * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of brands. + */ + public int getBrandsCount() { + return brands_.size(); + } + + /** + * + * + *
+     * Optional. Contains brand names associated with a product.
+     * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The brands at the given index. + */ + public java.lang.String getBrands(int index) { + return brands_.get(index); + } + + /** + * + * + *
+     * Optional. Contains brand names associated with a product.
+     * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the brands at the given index. + */ + public com.google.protobuf.ByteString getBrandsBytes(int index) { + return brands_.getByteString(index); + } + + /** + * + * + *
+     * Optional. Contains brand names associated with a product.
+     * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The brands to set. + * @return This builder for chaining. + */ + public Builder setBrands(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBrandsIsMutable(); + brands_.set(index, value); + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains brand names associated with a product.
+     * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The brands to add. + * @return This builder for chaining. + */ + public Builder addBrands(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBrandsIsMutable(); + brands_.add(value); + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains brand names associated with a product.
+     * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The brands to add. + * @return This builder for chaining. + */ + public Builder addAllBrands(java.lang.Iterable values) { + ensureBrandsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, brands_); + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains brand names associated with a product.
+     * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearBrands() { + brands_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x02000000); + ; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Contains brand names associated with a product.
+     * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the brands to add. + * @return This builder for chaining. + */ + public Builder addBrandsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureBrandsIsMutable(); + brands_.add(value); + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + + private boolean isSpam_; + + /** + * + * + *
+     * Optional. Indicates whether the review is marked as spam in the publisher's
+     * system.
+     * 
+ * + * optional bool is_spam = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the isSpam field is set. + */ + @java.lang.Override + public boolean hasIsSpam() { + return ((bitField0_ & 0x04000000) != 0); + } + + /** + * + * + *
+     * Optional. Indicates whether the review is marked as spam in the publisher's
+     * system.
+     * 
+ * + * optional bool is_spam = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isSpam. + */ + @java.lang.Override + public boolean getIsSpam() { + return isSpam_; + } + + /** + * + * + *
+     * Optional. Indicates whether the review is marked as spam in the publisher's
+     * system.
+     * 
+ * + * optional bool is_spam = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The isSpam to set. + * @return This builder for chaining. + */ + public Builder setIsSpam(boolean value) { + + isSpam_ = value; + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates whether the review is marked as spam in the publisher's
+     * system.
+     * 
+ * + * optional bool is_spam = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearIsSpam() { + bitField0_ = (bitField0_ & ~0x04000000); + isSpam_ = false; + onChanged(); + return this; + } + + private boolean isVerifiedPurchase_; + + /** + * + * + *
+     * Optional. Indicates whether the reviewer's purchase is verified.
+     * 
+ * + * optional bool is_verified_purchase = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the isVerifiedPurchase field is set. + */ + @java.lang.Override + public boolean hasIsVerifiedPurchase() { + return ((bitField0_ & 0x08000000) != 0); + } + + /** + * + * + *
+     * Optional. Indicates whether the reviewer's purchase is verified.
+     * 
+ * + * optional bool is_verified_purchase = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The isVerifiedPurchase. + */ + @java.lang.Override + public boolean getIsVerifiedPurchase() { + return isVerifiedPurchase_; + } + + /** + * + * + *
+     * Optional. Indicates whether the reviewer's purchase is verified.
+     * 
+ * + * optional bool is_verified_purchase = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The isVerifiedPurchase to set. + * @return This builder for chaining. + */ + public Builder setIsVerifiedPurchase(boolean value) { + + isVerifiedPurchase_ = value; + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates whether the reviewer's purchase is verified.
+     * 
+ * + * optional bool is_verified_purchase = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIsVerifiedPurchase() { + bitField0_ = (bitField0_ & ~0x08000000); + isVerifiedPurchase_ = false; + onChanged(); + return this; + } + + private boolean isIncentivizedReview_; + + /** + * + * + *
+     * Optional. Indicates whether the review is incentivized.
+     * 
+ * + * optional bool is_incentivized_review = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the isIncentivizedReview field is set. + */ + @java.lang.Override + public boolean hasIsIncentivizedReview() { + return ((bitField0_ & 0x10000000) != 0); + } + + /** + * + * + *
+     * Optional. Indicates whether the review is incentivized.
+     * 
+ * + * optional bool is_incentivized_review = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The isIncentivizedReview. + */ + @java.lang.Override + public boolean getIsIncentivizedReview() { + return isIncentivizedReview_; + } + + /** + * + * + *
+     * Optional. Indicates whether the review is incentivized.
+     * 
+ * + * optional bool is_incentivized_review = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The isIncentivizedReview to set. + * @return This builder for chaining. + */ + public Builder setIsIncentivizedReview(boolean value) { + + isIncentivizedReview_ = value; + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Indicates whether the review is incentivized.
+     * 
+ * + * optional bool is_incentivized_review = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearIsIncentivizedReview() { + bitField0_ = (bitField0_ & ~0x10000000); + isIncentivizedReview_ = false; + onChanged(); + return this; + } + + private int collectionMethod_ = 0; + + /** + * + * + *
+     * Optional. The method used to collect the review.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod collection_method = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for collectionMethod. + */ + @java.lang.Override + public int getCollectionMethodValue() { + return collectionMethod_; + } + + /** + * + * + *
+     * Optional. The method used to collect the review.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod collection_method = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for collectionMethod to set. + * @return This builder for chaining. + */ + public Builder setCollectionMethodValue(int value) { + collectionMethod_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The method used to collect the review.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod collection_method = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The collectionMethod. + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod + getCollectionMethod() { + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod result = + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod + .forNumber(collectionMethod_); + return result == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod + .UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The method used to collect the review.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod collection_method = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The collectionMethod to set. + * @return This builder for chaining. + */ + public Builder setCollectionMethod( + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x20000000; + collectionMethod_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The method used to collect the review.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod collection_method = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearCollectionMethod() { + bitField0_ = (bitField0_ & ~0x20000000); + collectionMethod_ = 0; + onChanged(); + return this; + } + + private java.lang.Object transactionId_ = ""; + + /** + * + * + *
+     * Optional. A permanent, unique identifier for the transaction associated
+     * with the review in the publisher's system. This ID can be used to indicate
+     * that multiple reviews are associated with the same transaction.
+     * 
+ * + * string transaction_id = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The transactionId. + */ + public java.lang.String getTransactionId() { + java.lang.Object ref = transactionId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + transactionId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A permanent, unique identifier for the transaction associated
+     * with the review in the publisher's system. This ID can be used to indicate
+     * that multiple reviews are associated with the same transaction.
+     * 
+ * + * string transaction_id = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for transactionId. + */ + public com.google.protobuf.ByteString getTransactionIdBytes() { + java.lang.Object ref = transactionId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + transactionId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A permanent, unique identifier for the transaction associated
+     * with the review in the publisher's system. This ID can be used to indicate
+     * that multiple reviews are associated with the same transaction.
+     * 
+ * + * string transaction_id = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + transactionId_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A permanent, unique identifier for the transaction associated
+     * with the review in the publisher's system. This ID can be used to indicate
+     * that multiple reviews are associated with the same transaction.
+     * 
+ * + * string transaction_id = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTransactionId() { + transactionId_ = getDefaultInstance().getTransactionId(); + bitField0_ = (bitField0_ & ~0x40000000); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A permanent, unique identifier for the transaction associated
+     * with the review in the publisher's system. This ID can be used to indicate
+     * that multiple reviews are associated with the same transaction.
+     * 
+ * + * string transaction_id = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for transactionId to set. + * @return This builder for chaining. + */ + public Builder setTransactionIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + transactionId_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reviews.v1.ProductReviewAttributes) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reviews.v1.ProductReviewAttributes) + private static final com.google.shopping.merchant.reviews.v1.ProductReviewAttributes + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reviews.v1.ProductReviewAttributes(); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewAttributes + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductReviewAttributes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewAttributes + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewAttributesOrBuilder.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewAttributesOrBuilder.java new file mode 100644 index 000000000000..778d7e0556a7 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewAttributesOrBuilder.java @@ -0,0 +1,1392 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews_common.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +@com.google.protobuf.Generated +public interface ProductReviewAttributesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reviews.v1.ProductReviewAttributes) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The name of the aggregator of the product reviews.
+   *
+   * A publisher may use a reviews aggregator to manage reviews and provide
+   * the feeds. This element indicates the use of an aggregator and contains
+   * information about the aggregator.
+   * 
+ * + * optional string aggregator_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the aggregatorName field is set. + */ + boolean hasAggregatorName(); + + /** + * + * + *
+   * Optional. The name of the aggregator of the product reviews.
+   *
+   * A publisher may use a reviews aggregator to manage reviews and provide
+   * the feeds. This element indicates the use of an aggregator and contains
+   * information about the aggregator.
+   * 
+ * + * optional string aggregator_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The aggregatorName. + */ + java.lang.String getAggregatorName(); + + /** + * + * + *
+   * Optional. The name of the aggregator of the product reviews.
+   *
+   * A publisher may use a reviews aggregator to manage reviews and provide
+   * the feeds. This element indicates the use of an aggregator and contains
+   * information about the aggregator.
+   * 
+ * + * optional string aggregator_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for aggregatorName. + */ + com.google.protobuf.ByteString getAggregatorNameBytes(); + + /** + * + * + *
+   * Optional. The name of the subclient of the product reviews.
+   *
+   * The subclient is an identifier of the product review source.
+   * It should be equivalent to the directory provided in the file data source
+   * path.
+   * 
+ * + * optional string subclient_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the subclientName field is set. + */ + boolean hasSubclientName(); + + /** + * + * + *
+   * Optional. The name of the subclient of the product reviews.
+   *
+   * The subclient is an identifier of the product review source.
+   * It should be equivalent to the directory provided in the file data source
+   * path.
+   * 
+ * + * optional string subclient_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The subclientName. + */ + java.lang.String getSubclientName(); + + /** + * + * + *
+   * Optional. The name of the subclient of the product reviews.
+   *
+   * The subclient is an identifier of the product review source.
+   * It should be equivalent to the directory provided in the file data source
+   * path.
+   * 
+ * + * optional string subclient_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for subclientName. + */ + com.google.protobuf.ByteString getSubclientNameBytes(); + + /** + * + * + *
+   * Optional. The name of the publisher of the product reviews.
+   *
+   * The information about the publisher, which may be a retailer,
+   * manufacturer, reviews service company, or any entity that publishes
+   * product reviews.
+   * 
+ * + * optional string publisher_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the publisherName field is set. + */ + boolean hasPublisherName(); + + /** + * + * + *
+   * Optional. The name of the publisher of the product reviews.
+   *
+   * The information about the publisher, which may be a retailer,
+   * manufacturer, reviews service company, or any entity that publishes
+   * product reviews.
+   * 
+ * + * optional string publisher_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The publisherName. + */ + java.lang.String getPublisherName(); + + /** + * + * + *
+   * Optional. The name of the publisher of the product reviews.
+   *
+   * The information about the publisher, which may be a retailer,
+   * manufacturer, reviews service company, or any entity that publishes
+   * product reviews.
+   * 
+ * + * optional string publisher_name = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for publisherName. + */ + com.google.protobuf.ByteString getPublisherNameBytes(); + + /** + * + * + *
+   * Optional. A link to the company favicon of the publisher. The image
+   * dimensions should be favicon size: 16x16 pixels. The image format should be
+   * GIF, JPG or PNG.
+   * 
+ * + * optional string publisher_favicon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the publisherFavicon field is set. + */ + boolean hasPublisherFavicon(); + + /** + * + * + *
+   * Optional. A link to the company favicon of the publisher. The image
+   * dimensions should be favicon size: 16x16 pixels. The image format should be
+   * GIF, JPG or PNG.
+   * 
+ * + * optional string publisher_favicon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The publisherFavicon. + */ + java.lang.String getPublisherFavicon(); + + /** + * + * + *
+   * Optional. A link to the company favicon of the publisher. The image
+   * dimensions should be favicon size: 16x16 pixels. The image format should be
+   * GIF, JPG or PNG.
+   * 
+ * + * optional string publisher_favicon = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for publisherFavicon. + */ + com.google.protobuf.ByteString getPublisherFaviconBytes(); + + /** + * + * + *
+   * Optional. The author of the product review.
+   *
+   * A permanent, unique identifier for the author of the review in the
+   * publisher's system.
+   * 
+ * + * optional string reviewer_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewerId field is set. + */ + boolean hasReviewerId(); + + /** + * + * + *
+   * Optional. The author of the product review.
+   *
+   * A permanent, unique identifier for the author of the review in the
+   * publisher's system.
+   * 
+ * + * optional string reviewer_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewerId. + */ + java.lang.String getReviewerId(); + + /** + * + * + *
+   * Optional. The author of the product review.
+   *
+   * A permanent, unique identifier for the author of the review in the
+   * publisher's system.
+   * 
+ * + * optional string reviewer_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for reviewerId. + */ + com.google.protobuf.ByteString getReviewerIdBytes(); + + /** + * + * + *
+   * Optional. Set to true if the reviewer should remain anonymous.
+   * 
+ * + * optional bool reviewer_is_anonymous = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewerIsAnonymous field is set. + */ + boolean hasReviewerIsAnonymous(); + + /** + * + * + *
+   * Optional. Set to true if the reviewer should remain anonymous.
+   * 
+ * + * optional bool reviewer_is_anonymous = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewerIsAnonymous. + */ + boolean getReviewerIsAnonymous(); + + /** + * + * + *
+   * Optional. The name of the reviewer of the product review.
+   * 
+ * + * optional string reviewer_username = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewerUsername field is set. + */ + boolean hasReviewerUsername(); + + /** + * + * + *
+   * Optional. The name of the reviewer of the product review.
+   * 
+ * + * optional string reviewer_username = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewerUsername. + */ + java.lang.String getReviewerUsername(); + + /** + * + * + *
+   * Optional. The name of the reviewer of the product review.
+   * 
+ * + * optional string reviewer_username = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for reviewerUsername. + */ + com.google.protobuf.ByteString getReviewerUsernameBytes(); + + /** + * + * + *
+   * Optional. The language of the review defined by BCP-47 language code.
+   * 
+ * + * optional string review_language = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewLanguage field is set. + */ + boolean hasReviewLanguage(); + + /** + * + * + *
+   * Optional. The language of the review defined by BCP-47 language code.
+   * 
+ * + * optional string review_language = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewLanguage. + */ + java.lang.String getReviewLanguage(); + + /** + * + * + *
+   * Optional. The language of the review defined by BCP-47 language code.
+   * 
+ * + * optional string review_language = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for reviewLanguage. + */ + com.google.protobuf.ByteString getReviewLanguageBytes(); + + /** + * + * + *
+   * Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country
+   * Code.
+   * 
+ * + * optional string review_country = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the reviewCountry field is set. + */ + boolean hasReviewCountry(); + + /** + * + * + *
+   * Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country
+   * Code.
+   * 
+ * + * optional string review_country = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The reviewCountry. + */ + java.lang.String getReviewCountry(); + + /** + * + * + *
+   * Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country
+   * Code.
+   * 
+ * + * optional string review_country = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for reviewCountry. + */ + com.google.protobuf.ByteString getReviewCountryBytes(); + + /** + * + * + *
+   * Required. The timestamp indicating when the review was written.
+   * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the reviewTime field is set. + */ + boolean hasReviewTime(); + + /** + * + * + *
+   * Required. The timestamp indicating when the review was written.
+   * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The reviewTime. + */ + com.google.protobuf.Timestamp getReviewTime(); + + /** + * + * + *
+   * Required. The timestamp indicating when the review was written.
+   * 
+ * + * .google.protobuf.Timestamp review_time = 10 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.TimestampOrBuilder getReviewTimeOrBuilder(); + + /** + * + * + *
+   * Optional. The title of the review.
+   * 
+ * + * optional string title = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the title field is set. + */ + boolean hasTitle(); + + /** + * + * + *
+   * Optional. The title of the review.
+   * 
+ * + * optional string title = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The title. + */ + java.lang.String getTitle(); + + /** + * + * + *
+   * Optional. The title of the review.
+   * 
+ * + * optional string title = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+   * Optional. The content of the review. If empty, the content might still get
+   * populated from pros and cons.
+   * 
+ * + * optional string content = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the content field is set. + */ + boolean hasContent(); + + /** + * + * + *
+   * Optional. The content of the review. If empty, the content might still get
+   * populated from pros and cons.
+   * 
+ * + * optional string content = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The content. + */ + java.lang.String getContent(); + + /** + * + * + *
+   * Optional. The content of the review. If empty, the content might still get
+   * populated from pros and cons.
+   * 
+ * + * optional string content = 12 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * Optional. Contains the advantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+   * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the pros. + */ + java.util.List getProsList(); + + /** + * + * + *
+   * Optional. Contains the advantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+   * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of pros. + */ + int getProsCount(); + + /** + * + * + *
+   * Optional. Contains the advantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+   * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The pros at the given index. + */ + java.lang.String getPros(int index); + + /** + * + * + *
+   * Optional. Contains the advantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "pro:" unless it was written by the reviewer.
+   * 
+ * + * repeated string pros = 13 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the pros at the given index. + */ + com.google.protobuf.ByteString getProsBytes(int index); + + /** + * + * + *
+   * Optional. Contains the disadvantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "con:" unless it was written by the reviewer.
+   * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the cons. + */ + java.util.List getConsList(); + + /** + * + * + *
+   * Optional. Contains the disadvantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "con:" unless it was written by the reviewer.
+   * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of cons. + */ + int getConsCount(); + + /** + * + * + *
+   * Optional. Contains the disadvantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "con:" unless it was written by the reviewer.
+   * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The cons at the given index. + */ + java.lang.String getCons(int index); + + /** + * + * + *
+   * Optional. Contains the disadvantages based on the opinion of the reviewer.
+   * Omit boilerplate text like "con:" unless it was written by the reviewer.
+   * 
+ * + * repeated string cons = 14 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the cons at the given index. + */ + com.google.protobuf.ByteString getConsBytes(int index); + + /** + * + * + *
+   * Optional. The URI of the review landing page.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the reviewLink field is set. + */ + boolean hasReviewLink(); + + /** + * + * + *
+   * Optional. The URI of the review landing page.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The reviewLink. + */ + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink getReviewLink(); + + /** + * + * + *
+   * Optional. The URI of the review landing page.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLink review_link = 15 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.ReviewLinkOrBuilder + getReviewLinkOrBuilder(); + + /** + * + * + *
+   * Optional. A URI to an image of the reviewed product created by the review
+   * author. The URI does not have to end with an image file extension.
+   * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the reviewerImageLinks. + */ + java.util.List getReviewerImageLinksList(); + + /** + * + * + *
+   * Optional. A URI to an image of the reviewed product created by the review
+   * author. The URI does not have to end with an image file extension.
+   * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of reviewerImageLinks. + */ + int getReviewerImageLinksCount(); + + /** + * + * + *
+   * Optional. A URI to an image of the reviewed product created by the review
+   * author. The URI does not have to end with an image file extension.
+   * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The reviewerImageLinks at the given index. + */ + java.lang.String getReviewerImageLinks(int index); + + /** + * + * + *
+   * Optional. A URI to an image of the reviewed product created by the review
+   * author. The URI does not have to end with an image file extension.
+   * 
+ * + * repeated string reviewer_image_links = 16 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the reviewerImageLinks at the given index. + */ + com.google.protobuf.ByteString getReviewerImageLinksBytes(int index); + + /** + * + * + *
+   * Optional. Contains the ratings associated with the review.
+   * The minimum possible number for the rating. This should be the worst
+   * possible rating and should not be a value for no rating.
+   * 
+ * + * optional int64 min_rating = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the minRating field is set. + */ + boolean hasMinRating(); + + /** + * + * + *
+   * Optional. Contains the ratings associated with the review.
+   * The minimum possible number for the rating. This should be the worst
+   * possible rating and should not be a value for no rating.
+   * 
+ * + * optional int64 min_rating = 17 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The minRating. + */ + long getMinRating(); + + /** + * + * + *
+   * Optional. The maximum possible number for the rating. The value of the max
+   * rating must be greater than the value of the min attribute.
+   * 
+ * + * optional int64 max_rating = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the maxRating field is set. + */ + boolean hasMaxRating(); + + /** + * + * + *
+   * Optional. The maximum possible number for the rating. The value of the max
+   * rating must be greater than the value of the min attribute.
+   * 
+ * + * optional int64 max_rating = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxRating. + */ + long getMaxRating(); + + /** + * + * + *
+   * Optional. The reviewer's overall rating of the product.
+   * 
+ * + * optional double rating = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the rating field is set. + */ + boolean hasRating(); + + /** + * + * + *
+   * Optional. The reviewer's overall rating of the product.
+   * 
+ * + * optional double rating = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rating. + */ + double getRating(); + + /** + * + * + *
+   * Optional. Descriptive name of a product.
+   * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the productNames. + */ + java.util.List getProductNamesList(); + + /** + * + * + *
+   * Optional. Descriptive name of a product.
+   * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of productNames. + */ + int getProductNamesCount(); + + /** + * + * + *
+   * Optional. Descriptive name of a product.
+   * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The productNames at the given index. + */ + java.lang.String getProductNames(int index); + + /** + * + * + *
+   * Optional. Descriptive name of a product.
+   * 
+ * + * repeated string product_names = 20 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the productNames at the given index. + */ + com.google.protobuf.ByteString getProductNamesBytes(int index); + + /** + * + * + *
+   * Optional. The URI of the product. This URI can have the same value as the
+   * `review_link` element, if the review URI and the product URI are the
+   * same.
+   * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the productLinks. + */ + java.util.List getProductLinksList(); + + /** + * + * + *
+   * Optional. The URI of the product. This URI can have the same value as the
+   * `review_link` element, if the review URI and the product URI are the
+   * same.
+   * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of productLinks. + */ + int getProductLinksCount(); + + /** + * + * + *
+   * Optional. The URI of the product. This URI can have the same value as the
+   * `review_link` element, if the review URI and the product URI are the
+   * same.
+   * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The productLinks at the given index. + */ + java.lang.String getProductLinks(int index); + + /** + * + * + *
+   * Optional. The URI of the product. This URI can have the same value as the
+   * `review_link` element, if the review URI and the product URI are the
+   * same.
+   * 
+ * + * repeated string product_links = 21 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the productLinks at the given index. + */ + com.google.protobuf.ByteString getProductLinksBytes(int index); + + /** + * + * + *
+   * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+   * associated with a product.
+   * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the asins. + */ + java.util.List getAsinsList(); + + /** + * + * + *
+   * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+   * associated with a product.
+   * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of asins. + */ + int getAsinsCount(); + + /** + * + * + *
+   * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+   * associated with a product.
+   * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The asins at the given index. + */ + java.lang.String getAsins(int index); + + /** + * + * + *
+   * Optional. Contains ASINs (Amazon Standard Identification Numbers)
+   * associated with a product.
+   * 
+ * + * repeated string asins = 22 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the asins at the given index. + */ + com.google.protobuf.ByteString getAsinsBytes(int index); + + /** + * + * + *
+   * Optional. Contains GTINs (global trade item numbers) associated with a
+   * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+   * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the gtins. + */ + java.util.List getGtinsList(); + + /** + * + * + *
+   * Optional. Contains GTINs (global trade item numbers) associated with a
+   * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+   * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of gtins. + */ + int getGtinsCount(); + + /** + * + * + *
+   * Optional. Contains GTINs (global trade item numbers) associated with a
+   * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+   * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The gtins at the given index. + */ + java.lang.String getGtins(int index); + + /** + * + * + *
+   * Optional. Contains GTINs (global trade item numbers) associated with a
+   * product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported.
+   * 
+ * + * repeated string gtins = 23 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the gtins at the given index. + */ + com.google.protobuf.ByteString getGtinsBytes(int index); + + /** + * + * + *
+   * Optional. Contains MPNs (manufacturer part numbers) associated with a
+   * product.
+   * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the mpns. + */ + java.util.List getMpnsList(); + + /** + * + * + *
+   * Optional. Contains MPNs (manufacturer part numbers) associated with a
+   * product.
+   * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of mpns. + */ + int getMpnsCount(); + + /** + * + * + *
+   * Optional. Contains MPNs (manufacturer part numbers) associated with a
+   * product.
+   * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The mpns at the given index. + */ + java.lang.String getMpns(int index); + + /** + * + * + *
+   * Optional. Contains MPNs (manufacturer part numbers) associated with a
+   * product.
+   * 
+ * + * repeated string mpns = 24 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the mpns at the given index. + */ + com.google.protobuf.ByteString getMpnsBytes(int index); + + /** + * + * + *
+   * Optional. Contains SKUs (stock keeping units) associated with a product.
+   * Often this matches the product Offer Id in the product feed.
+   * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the skus. + */ + java.util.List getSkusList(); + + /** + * + * + *
+   * Optional. Contains SKUs (stock keeping units) associated with a product.
+   * Often this matches the product Offer Id in the product feed.
+   * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of skus. + */ + int getSkusCount(); + + /** + * + * + *
+   * Optional. Contains SKUs (stock keeping units) associated with a product.
+   * Often this matches the product Offer Id in the product feed.
+   * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The skus at the given index. + */ + java.lang.String getSkus(int index); + + /** + * + * + *
+   * Optional. Contains SKUs (stock keeping units) associated with a product.
+   * Often this matches the product Offer Id in the product feed.
+   * 
+ * + * repeated string skus = 25 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the skus at the given index. + */ + com.google.protobuf.ByteString getSkusBytes(int index); + + /** + * + * + *
+   * Optional. Contains brand names associated with a product.
+   * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the brands. + */ + java.util.List getBrandsList(); + + /** + * + * + *
+   * Optional. Contains brand names associated with a product.
+   * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of brands. + */ + int getBrandsCount(); + + /** + * + * + *
+   * Optional. Contains brand names associated with a product.
+   * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The brands at the given index. + */ + java.lang.String getBrands(int index); + + /** + * + * + *
+   * Optional. Contains brand names associated with a product.
+   * 
+ * + * repeated string brands = 26 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the brands at the given index. + */ + com.google.protobuf.ByteString getBrandsBytes(int index); + + /** + * + * + *
+   * Optional. Indicates whether the review is marked as spam in the publisher's
+   * system.
+   * 
+ * + * optional bool is_spam = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the isSpam field is set. + */ + boolean hasIsSpam(); + + /** + * + * + *
+   * Optional. Indicates whether the review is marked as spam in the publisher's
+   * system.
+   * 
+ * + * optional bool is_spam = 27 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isSpam. + */ + boolean getIsSpam(); + + /** + * + * + *
+   * Optional. Indicates whether the reviewer's purchase is verified.
+   * 
+ * + * optional bool is_verified_purchase = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the isVerifiedPurchase field is set. + */ + boolean hasIsVerifiedPurchase(); + + /** + * + * + *
+   * Optional. Indicates whether the reviewer's purchase is verified.
+   * 
+ * + * optional bool is_verified_purchase = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The isVerifiedPurchase. + */ + boolean getIsVerifiedPurchase(); + + /** + * + * + *
+   * Optional. Indicates whether the review is incentivized.
+   * 
+ * + * optional bool is_incentivized_review = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the isIncentivizedReview field is set. + */ + boolean hasIsIncentivizedReview(); + + /** + * + * + *
+   * Optional. Indicates whether the review is incentivized.
+   * 
+ * + * optional bool is_incentivized_review = 31 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The isIncentivizedReview. + */ + boolean getIsIncentivizedReview(); + + /** + * + * + *
+   * Optional. The method used to collect the review.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod collection_method = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for collectionMethod. + */ + int getCollectionMethodValue(); + + /** + * + * + *
+   * Optional. The method used to collect the review.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod collection_method = 28 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The collectionMethod. + */ + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethod + getCollectionMethod(); + + /** + * + * + *
+   * Optional. A permanent, unique identifier for the transaction associated
+   * with the review in the publisher's system. This ID can be used to indicate
+   * that multiple reviews are associated with the same transaction.
+   * 
+ * + * string transaction_id = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The transactionId. + */ + java.lang.String getTransactionId(); + + /** + * + * + *
+   * Optional. A permanent, unique identifier for the transaction associated
+   * with the review in the publisher's system. This ID can be used to indicate
+   * that multiple reviews are associated with the same transaction.
+   * 
+ * + * string transaction_id = 29 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for transactionId. + */ + com.google.protobuf.ByteString getTransactionIdBytes(); +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewName.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewName.java new file mode 100644 index 000000000000..e6500a391b2a --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewName.java @@ -0,0 +1,195 @@ +/* + * 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; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@NullMarked +@Generated("by gapic-generator-java") +public class ProductReviewName implements ResourceName { + private static final PathTemplate ACCOUNT_PRODUCTREVIEW = + PathTemplate.createWithoutUrlEncoding("accounts/{account}/productReviews/{productreview}"); + private volatile Map fieldValuesMap; + private final String account; + private final String productreview; + + @Deprecated + protected ProductReviewName() { + account = null; + productreview = null; + } + + private ProductReviewName(Builder builder) { + account = Preconditions.checkNotNull(builder.getAccount()); + productreview = Preconditions.checkNotNull(builder.getProductreview()); + } + + public String getAccount() { + return account; + } + + public String getProductreview() { + return productreview; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProductReviewName of(String account, String productreview) { + return newBuilder().setAccount(account).setProductreview(productreview).build(); + } + + public static String format(String account, String productreview) { + return newBuilder().setAccount(account).setProductreview(productreview).build().toString(); + } + + public static @Nullable ProductReviewName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ACCOUNT_PRODUCTREVIEW.validatedMatch( + formattedString, "ProductReviewName.parse: formattedString not in valid format"); + return of(matchMap.get("account"), matchMap.get("productreview")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List<@Nullable ProductReviewName> values) { + List list = new ArrayList<>(values.size()); + for (ProductReviewName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ACCOUNT_PRODUCTREVIEW.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (account != null) { + fieldMapBuilder.put("account", account); + } + if (productreview != null) { + fieldMapBuilder.put("productreview", productreview); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ACCOUNT_PRODUCTREVIEW.instantiate("account", account, "productreview", productreview); + } + + @Override + public boolean equals(@Nullable Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + ProductReviewName that = ((ProductReviewName) o); + return Objects.equals(this.account, that.account) + && Objects.equals(this.productreview, that.productreview); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(account); + h *= 1000003; + h ^= Objects.hashCode(productreview); + return h; + } + + /** Builder for accounts/{account}/productReviews/{productreview}. */ + public static class Builder { + private String account; + private String productreview; + + protected Builder() {} + + public String getAccount() { + return account; + } + + public String getProductreview() { + return productreview; + } + + public Builder setAccount(String account) { + this.account = account; + return this; + } + + public Builder setProductreview(String productreview) { + this.productreview = productreview; + return this; + } + + private Builder(ProductReviewName productReviewName) { + this.account = productReviewName.account; + this.productreview = productReviewName.productreview; + } + + public ProductReviewName build() { + return new ProductReviewName(this); + } + } +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewOrBuilder.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewOrBuilder.java new file mode 100644 index 000000000000..bb8b69253404 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewOrBuilder.java @@ -0,0 +1,269 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +@com.google.protobuf.Generated +public interface ProductReviewOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reviews.v1.ProductReview) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The name of the product review.
+   * Format:
+   * `"{productreview.name=accounts/{account}/productReviews/{productReview}}"`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The name of the product review.
+   * Format:
+   * `"{productreview.name=accounts/{account}/productReviews/{productReview}}"`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The permanent, unique identifier for the product review in the
+   * publisher’s system.
+   * 
+ * + * string product_review_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The productReviewId. + */ + java.lang.String getProductReviewId(); + + /** + * + * + *
+   * Required. The permanent, unique identifier for the product review in the
+   * publisher’s system.
+   * 
+ * + * string product_review_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for productReviewId. + */ + com.google.protobuf.ByteString getProductReviewIdBytes(); + + /** + * + * + *
+   * Optional. A list of product review attributes.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the productReviewAttributes field is set. + */ + boolean hasProductReviewAttributes(); + + /** + * + * + *
+   * Optional. A list of product review attributes.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The productReviewAttributes. + */ + com.google.shopping.merchant.reviews.v1.ProductReviewAttributes getProductReviewAttributes(); + + /** + * + * + *
+   * Optional. A list of product review attributes.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewAttributes product_review_attributes = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.shopping.merchant.reviews.v1.ProductReviewAttributesOrBuilder + getProductReviewAttributesOrBuilder(); + + /** + * + * + *
+   * Optional. A list of custom (merchant-provided) attributes.
+   * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getCustomAttributesList(); + + /** + * + * + *
+   * Optional. A list of custom (merchant-provided) attributes.
+   * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.shopping.type.CustomAttribute getCustomAttributes(int index); + + /** + * + * + *
+   * Optional. A list of custom (merchant-provided) attributes.
+   * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getCustomAttributesCount(); + + /** + * + * + *
+   * Optional. A list of custom (merchant-provided) attributes.
+   * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getCustomAttributesOrBuilderList(); + + /** + * + * + *
+   * Optional. A list of custom (merchant-provided) attributes.
+   * 
+ * + * + * repeated .google.shopping.type.CustomAttribute custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.shopping.type.CustomAttributeOrBuilder getCustomAttributesOrBuilder(int index); + + /** + * + * + *
+   * Output only. The primary data source of the product review.
+   * 
+ * + * string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The dataSource. + */ + java.lang.String getDataSource(); + + /** + * + * + *
+   * Output only. The primary data source of the product review.
+   * 
+ * + * string data_source = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for dataSource. + */ + com.google.protobuf.ByteString getDataSourceBytes(); + + /** + * + * + *
+   * Output only. The status of a product review, data validation issues, that
+   * is, information about a product review computed asynchronously.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the productReviewStatus field is set. + */ + boolean hasProductReviewStatus(); + + /** + * + * + *
+   * Output only. The status of a product review, data validation issues, that
+   * is, information about a product review computed asynchronously.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The productReviewStatus. + */ + com.google.shopping.merchant.reviews.v1.ProductReviewStatus getProductReviewStatus(); + + /** + * + * + *
+   * Output only. The status of a product review, data validation issues, that
+   * is, information about a product review computed asynchronously.
+   * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus product_review_status = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.shopping.merchant.reviews.v1.ProductReviewStatusOrBuilder + getProductReviewStatusOrBuilder(); +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewStatus.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewStatus.java new file mode 100644 index 000000000000..68b3c8726837 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewStatus.java @@ -0,0 +1,5345 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews_common.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +/** + * + * + *
+ * Product review status.
+ * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.ProductReviewStatus} + */ +@com.google.protobuf.Generated +public final class ProductReviewStatus extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reviews.v1.ProductReviewStatus) + ProductReviewStatusOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ProductReviewStatus"); + } + + // Use ProductReviewStatus.newBuilder() to construct. + private ProductReviewStatus(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ProductReviewStatus() { + destinationStatuses_ = java.util.Collections.emptyList(); + itemLevelIssues_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.class, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.Builder.class); + } + + public interface ProductReviewDestinationStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The name of the reporting context.
+     * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for reportingContext. + */ + int getReportingContextValue(); + + /** + * + * + *
+     * Output only. The name of the reporting context.
+     * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The reportingContext. + */ + com.google.shopping.type.ReportingContext.ReportingContextEnum getReportingContext(); + } + + /** + * + * + *
+   * The destination status of the product review status.
+   * 
+ * + * Protobuf type {@code + * google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus} + */ + public static final class ProductReviewDestinationStatus + extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus) + ProductReviewDestinationStatusOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ProductReviewDestinationStatus"); + } + + // Use ProductReviewDestinationStatus.newBuilder() to construct. + private ProductReviewDestinationStatus( + com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ProductReviewDestinationStatus() { + reportingContext_ = 0; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewDestinationStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewDestinationStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.class, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.Builder.class); + } + + public static final int REPORTING_CONTEXT_FIELD_NUMBER = 1; + private int reportingContext_ = 0; + + /** + * + * + *
+     * Output only. The name of the reporting context.
+     * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for reportingContext. + */ + @java.lang.Override + public int getReportingContextValue() { + return reportingContext_; + } + + /** + * + * + *
+     * Output only. The name of the reporting context.
+     * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The reportingContext. + */ + @java.lang.Override + public com.google.shopping.type.ReportingContext.ReportingContextEnum getReportingContext() { + com.google.shopping.type.ReportingContext.ReportingContextEnum result = + com.google.shopping.type.ReportingContext.ReportingContextEnum.forNumber( + reportingContext_); + return result == null + ? com.google.shopping.type.ReportingContext.ReportingContextEnum.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (reportingContext_ + != com.google.shopping.type.ReportingContext.ReportingContextEnum + .REPORTING_CONTEXT_ENUM_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, reportingContext_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (reportingContext_ + != com.google.shopping.type.ReportingContext.ReportingContextEnum + .REPORTING_CONTEXT_ENUM_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, reportingContext_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus)) { + return super.equals(obj); + } + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + other = + (com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus) + obj; + + if (reportingContext_ != other.reportingContext_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + REPORTING_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + reportingContext_; + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The destination status of the product review status.
+     * 
+ * + * Protobuf type {@code + * google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus) + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewDestinationStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewDestinationStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.class, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.Builder.class); + } + + // Construct using + // com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + reportingContext_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewDestinationStatus_descriptor; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + getDefaultInstanceForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + build() { + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + buildPartial() { + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + result = + new com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.reportingContext_ = reportingContext_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus) { + return mergeFrom( + (com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + other) { + if (other + == com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.getDefaultInstance()) return this; + if (other.reportingContext_ != 0) { + setReportingContextValue(other.getReportingContextValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + reportingContext_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private int reportingContext_ = 0; + + /** + * + * + *
+       * Output only. The name of the reporting context.
+       * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for reportingContext. + */ + @java.lang.Override + public int getReportingContextValue() { + return reportingContext_; + } + + /** + * + * + *
+       * Output only. The name of the reporting context.
+       * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for reportingContext to set. + * @return This builder for chaining. + */ + public Builder setReportingContextValue(int value) { + reportingContext_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The name of the reporting context.
+       * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The reportingContext. + */ + @java.lang.Override + public com.google.shopping.type.ReportingContext.ReportingContextEnum getReportingContext() { + com.google.shopping.type.ReportingContext.ReportingContextEnum result = + com.google.shopping.type.ReportingContext.ReportingContextEnum.forNumber( + reportingContext_); + return result == null + ? com.google.shopping.type.ReportingContext.ReportingContextEnum.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. The name of the reporting context.
+       * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The reportingContext to set. + * @return This builder for chaining. + */ + public Builder setReportingContext( + com.google.shopping.type.ReportingContext.ReportingContextEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + reportingContext_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The name of the reporting context.
+       * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearReportingContext() { + bitField0_ = (bitField0_ & ~0x00000001); + reportingContext_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus) + private static final com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus(); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductReviewDestinationStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ProductReviewItemLevelIssueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The error code of the issue.
+     * 
+ * + * string code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The code. + */ + java.lang.String getCode(); + + /** + * + * + *
+     * Output only. The error code of the issue.
+     * 
+ * + * string code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for code. + */ + com.google.protobuf.ByteString getCodeBytes(); + + /** + * + * + *
+     * Output only. How this issue affects serving of the product review.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.Severity severity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for severity. + */ + int getSeverityValue(); + + /** + * + * + *
+     * Output only. How this issue affects serving of the product review.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.Severity severity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The severity. + */ + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.Severity + getSeverity(); + + /** + * + * + *
+     * Output only. Whether the issue can be resolved by the merchant.
+     * 
+ * + * string resolution = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resolution. + */ + java.lang.String getResolution(); + + /** + * + * + *
+     * Output only. Whether the issue can be resolved by the merchant.
+     * 
+ * + * string resolution = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resolution. + */ + com.google.protobuf.ByteString getResolutionBytes(); + + /** + * + * + *
+     * Output only. The attribute's name, if the issue is caused by a single
+     * attribute.
+     * 
+ * + * string attribute = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The attribute. + */ + java.lang.String getAttribute(); + + /** + * + * + *
+     * Output only. The attribute's name, if the issue is caused by a single
+     * attribute.
+     * 
+ * + * string attribute = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for attribute. + */ + com.google.protobuf.ByteString getAttributeBytes(); + + /** + * + * + *
+     * Output only. The reporting context the issue applies to.
+     * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for reportingContext. + */ + int getReportingContextValue(); + + /** + * + * + *
+     * Output only. The reporting context the issue applies to.
+     * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The reportingContext. + */ + com.google.shopping.type.ReportingContext.ReportingContextEnum getReportingContext(); + + /** + * + * + *
+     * Output only. A short issue description in English.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + java.lang.String getDescription(); + + /** + * + * + *
+     * Output only. A short issue description in English.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * Output only. A detailed issue description in English.
+     * 
+ * + * string detail = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The detail. + */ + java.lang.String getDetail(); + + /** + * + * + *
+     * Output only. A detailed issue description in English.
+     * 
+ * + * string detail = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for detail. + */ + com.google.protobuf.ByteString getDetailBytes(); + + /** + * + * + *
+     * Output only. The URL of a web page to help with resolving this issue.
+     * 
+ * + * string documentation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The documentation. + */ + java.lang.String getDocumentation(); + + /** + * + * + *
+     * Output only. The URL of a web page to help with resolving this issue.
+     * 
+ * + * string documentation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for documentation. + */ + com.google.protobuf.ByteString getDocumentationBytes(); + } + + /** + * + * + *
+   * The ItemLevelIssue of the product review status.
+   * 
+ * + * Protobuf type {@code + * google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue} + */ + public static final class ProductReviewItemLevelIssue extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue) + ProductReviewItemLevelIssueOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ProductReviewItemLevelIssue"); + } + + // Use ProductReviewItemLevelIssue.newBuilder() to construct. + private ProductReviewItemLevelIssue(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ProductReviewItemLevelIssue() { + code_ = ""; + severity_ = 0; + resolution_ = ""; + attribute_ = ""; + reportingContext_ = 0; + description_ = ""; + detail_ = ""; + documentation_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewItemLevelIssue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewItemLevelIssue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.class, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.Builder.class); + } + + /** + * + * + *
+     * How the issue affects the serving of the product review.
+     * 
+ * + * Protobuf enum {@code + * google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.Severity} + */ + public enum Severity implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Not specified.
+       * 
+ * + * SEVERITY_UNSPECIFIED = 0; + */ + SEVERITY_UNSPECIFIED(0), + /** + * + * + *
+       * This issue represents a warning and does not have a direct affect
+       * on the product review.
+       * 
+ * + * NOT_IMPACTED = 1; + */ + NOT_IMPACTED(1), + /** + * + * + *
+       * Issue disapproves the product review.
+       * 
+ * + * DISAPPROVED = 2; + */ + DISAPPROVED(2), + UNRECOGNIZED(-1), + ; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "Severity"); + } + + /** + * + * + *
+       * Not specified.
+       * 
+ * + * SEVERITY_UNSPECIFIED = 0; + */ + public static final int SEVERITY_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * This issue represents a warning and does not have a direct affect
+       * on the product review.
+       * 
+ * + * NOT_IMPACTED = 1; + */ + public static final int NOT_IMPACTED_VALUE = 1; + + /** + * + * + *
+       * Issue disapproves the product review.
+       * 
+ * + * DISAPPROVED = 2; + */ + public static final int DISAPPROVED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Severity valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Severity forNumber(int value) { + switch (value) { + case 0: + return SEVERITY_UNSPECIFIED; + case 1: + return NOT_IMPACTED; + case 2: + return DISAPPROVED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Severity findValueByNumber(int number) { + return Severity.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Severity[] VALUES = values(); + + public static Severity valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Severity(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.Severity) + } + + public static final int CODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object code_ = ""; + + /** + * + * + *
+     * Output only. The error code of the issue.
+     * 
+ * + * string code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The code. + */ + @java.lang.Override + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. The error code of the issue.
+     * 
+ * + * string code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for code. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEVERITY_FIELD_NUMBER = 2; + private int severity_ = 0; + + /** + * + * + *
+     * Output only. How this issue affects serving of the product review.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.Severity severity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + + /** + * + * + *
+     * Output only. How this issue affects serving of the product review.
+     * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.Severity severity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The severity. + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Severity + getSeverity() { + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Severity + result = + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.Severity.forNumber(severity_); + return result == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Severity.UNRECOGNIZED + : result; + } + + public static final int RESOLUTION_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object resolution_ = ""; + + /** + * + * + *
+     * Output only. Whether the issue can be resolved by the merchant.
+     * 
+ * + * string resolution = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resolution. + */ + @java.lang.Override + public java.lang.String getResolution() { + java.lang.Object ref = resolution_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resolution_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. Whether the issue can be resolved by the merchant.
+     * 
+ * + * string resolution = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resolution. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResolutionBytes() { + java.lang.Object ref = resolution_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resolution_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTE_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object attribute_ = ""; + + /** + * + * + *
+     * Output only. The attribute's name, if the issue is caused by a single
+     * attribute.
+     * 
+ * + * string attribute = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The attribute. + */ + @java.lang.Override + public java.lang.String getAttribute() { + java.lang.Object ref = attribute_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attribute_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. The attribute's name, if the issue is caused by a single
+     * attribute.
+     * 
+ * + * string attribute = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for attribute. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributeBytes() { + java.lang.Object ref = attribute_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attribute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REPORTING_CONTEXT_FIELD_NUMBER = 5; + private int reportingContext_ = 0; + + /** + * + * + *
+     * Output only. The reporting context the issue applies to.
+     * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for reportingContext. + */ + @java.lang.Override + public int getReportingContextValue() { + return reportingContext_; + } + + /** + * + * + *
+     * Output only. The reporting context the issue applies to.
+     * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The reportingContext. + */ + @java.lang.Override + public com.google.shopping.type.ReportingContext.ReportingContextEnum getReportingContext() { + com.google.shopping.type.ReportingContext.ReportingContextEnum result = + com.google.shopping.type.ReportingContext.ReportingContextEnum.forNumber( + reportingContext_); + return result == null + ? com.google.shopping.type.ReportingContext.ReportingContextEnum.UNRECOGNIZED + : result; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + + /** + * + * + *
+     * Output only. A short issue description in English.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. A short issue description in English.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DETAIL_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object detail_ = ""; + + /** + * + * + *
+     * Output only. A detailed issue description in English.
+     * 
+ * + * string detail = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The detail. + */ + @java.lang.Override + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. A detailed issue description in English.
+     * 
+ * + * string detail = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for detail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOCUMENTATION_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object documentation_ = ""; + + /** + * + * + *
+     * Output only. The URL of a web page to help with resolving this issue.
+     * 
+ * + * string documentation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The documentation. + */ + @java.lang.Override + public java.lang.String getDocumentation() { + java.lang.Object ref = documentation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + documentation_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. The URL of a web page to help with resolving this issue.
+     * 
+ * + * string documentation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for documentation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDocumentationBytes() { + java.lang.Object ref = documentation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + documentation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(code_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, code_); + } + if (severity_ + != com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Severity.SEVERITY_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, severity_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resolution_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, resolution_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(attribute_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, attribute_); + } + if (reportingContext_ + != com.google.shopping.type.ReportingContext.ReportingContextEnum + .REPORTING_CONTEXT_ENUM_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, reportingContext_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(detail_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, detail_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(documentation_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 8, documentation_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(code_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, code_); + } + if (severity_ + != com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Severity.SEVERITY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, severity_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(resolution_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, resolution_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(attribute_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, attribute_); + } + if (reportingContext_ + != com.google.shopping.type.ReportingContext.ReportingContextEnum + .REPORTING_CONTEXT_ENUM_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, reportingContext_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, description_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(detail_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, detail_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(documentation_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(8, documentation_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue)) { + return super.equals(obj); + } + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + other = + (com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue) + obj; + + if (!getCode().equals(other.getCode())) return false; + if (severity_ != other.severity_) return false; + if (!getResolution().equals(other.getResolution())) return false; + if (!getAttribute().equals(other.getAttribute())) return false; + if (reportingContext_ != other.reportingContext_) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getDetail().equals(other.getDetail())) return false; + if (!getDocumentation().equals(other.getDocumentation())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CODE_FIELD_NUMBER; + hash = (53 * hash) + getCode().hashCode(); + hash = (37 * hash) + SEVERITY_FIELD_NUMBER; + hash = (53 * hash) + severity_; + hash = (37 * hash) + RESOLUTION_FIELD_NUMBER; + hash = (53 * hash) + getResolution().hashCode(); + hash = (37 * hash) + ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getAttribute().hashCode(); + hash = (37 * hash) + REPORTING_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + reportingContext_; + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DETAIL_FIELD_NUMBER; + hash = (53 * hash) + getDetail().hashCode(); + hash = (37 * hash) + DOCUMENTATION_FIELD_NUMBER; + hash = (53 * hash) + getDocumentation().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+     * The ItemLevelIssue of the product review status.
+     * 
+ * + * Protobuf type {@code + * google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue) + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewItemLevelIssue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewItemLevelIssue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.class, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.Builder.class); + } + + // Construct using + // com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + code_ = ""; + severity_ = 0; + resolution_ = ""; + attribute_ = ""; + reportingContext_ = 0; + description_ = ""; + detail_ = ""; + documentation_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewItemLevelIssue_descriptor; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + getDefaultInstanceForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + build() { + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + buildPartial() { + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + result = + new com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.code_ = code_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.severity_ = severity_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.resolution_ = resolution_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.attribute_ = attribute_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.reportingContext_ = reportingContext_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.detail_ = detail_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.documentation_ = documentation_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue) { + return mergeFrom( + (com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + other) { + if (other + == com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.getDefaultInstance()) return this; + if (!other.getCode().isEmpty()) { + code_ = other.code_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.severity_ != 0) { + setSeverityValue(other.getSeverityValue()); + } + if (!other.getResolution().isEmpty()) { + resolution_ = other.resolution_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getAttribute().isEmpty()) { + attribute_ = other.attribute_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.reportingContext_ != 0) { + setReportingContextValue(other.getReportingContextValue()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getDetail().isEmpty()) { + detail_ = other.detail_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (!other.getDocumentation().isEmpty()) { + documentation_ = other.documentation_; + bitField0_ |= 0x00000080; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + code_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + severity_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + resolution_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + attribute_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + reportingContext_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + detail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + documentation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.lang.Object code_ = ""; + + /** + * + * + *
+       * Output only. The error code of the issue.
+       * 
+ * + * string code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The code. + */ + public java.lang.String getCode() { + java.lang.Object ref = code_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + code_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. The error code of the issue.
+       * 
+ * + * string code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for code. + */ + public com.google.protobuf.ByteString getCodeBytes() { + java.lang.Object ref = code_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + code_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. The error code of the issue.
+       * 
+ * + * string code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The error code of the issue.
+       * 
+ * + * string code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + code_ = getDefaultInstance().getCode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The error code of the issue.
+       * 
+ * + * string code = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for code to set. + * @return This builder for chaining. + */ + public Builder setCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + code_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int severity_ = 0; + + /** + * + * + *
+       * Output only. How this issue affects serving of the product review.
+       * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.Severity severity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for severity. + */ + @java.lang.Override + public int getSeverityValue() { + return severity_; + } + + /** + * + * + *
+       * Output only. How this issue affects serving of the product review.
+       * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.Severity severity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for severity to set. + * @return This builder for chaining. + */ + public Builder setSeverityValue(int value) { + severity_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. How this issue affects serving of the product review.
+       * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.Severity severity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The severity. + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Severity + getSeverity() { + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Severity + result = + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.Severity.forNumber(severity_); + return result == null + ? com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.Severity.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. How this issue affects serving of the product review.
+       * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.Severity severity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The severity to set. + * @return This builder for chaining. + */ + public Builder setSeverity( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Severity + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + severity_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. How this issue affects serving of the product review.
+       * 
+ * + * + * .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue.Severity severity = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000002); + severity_ = 0; + onChanged(); + return this; + } + + private java.lang.Object resolution_ = ""; + + /** + * + * + *
+       * Output only. Whether the issue can be resolved by the merchant.
+       * 
+ * + * string resolution = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The resolution. + */ + public java.lang.String getResolution() { + java.lang.Object ref = resolution_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resolution_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. Whether the issue can be resolved by the merchant.
+       * 
+ * + * string resolution = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for resolution. + */ + public com.google.protobuf.ByteString getResolutionBytes() { + java.lang.Object ref = resolution_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resolution_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. Whether the issue can be resolved by the merchant.
+       * 
+ * + * string resolution = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The resolution to set. + * @return This builder for chaining. + */ + public Builder setResolution(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resolution_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Whether the issue can be resolved by the merchant.
+       * 
+ * + * string resolution = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearResolution() { + resolution_ = getDefaultInstance().getResolution(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. Whether the issue can be resolved by the merchant.
+       * 
+ * + * string resolution = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for resolution to set. + * @return This builder for chaining. + */ + public Builder setResolutionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resolution_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object attribute_ = ""; + + /** + * + * + *
+       * Output only. The attribute's name, if the issue is caused by a single
+       * attribute.
+       * 
+ * + * string attribute = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The attribute. + */ + public java.lang.String getAttribute() { + java.lang.Object ref = attribute_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attribute_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. The attribute's name, if the issue is caused by a single
+       * attribute.
+       * 
+ * + * string attribute = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for attribute. + */ + public com.google.protobuf.ByteString getAttributeBytes() { + java.lang.Object ref = attribute_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attribute_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. The attribute's name, if the issue is caused by a single
+       * attribute.
+       * 
+ * + * string attribute = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The attribute to set. + * @return This builder for chaining. + */ + public Builder setAttribute(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + attribute_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The attribute's name, if the issue is caused by a single
+       * attribute.
+       * 
+ * + * string attribute = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAttribute() { + attribute_ = getDefaultInstance().getAttribute(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The attribute's name, if the issue is caused by a single
+       * attribute.
+       * 
+ * + * string attribute = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for attribute to set. + * @return This builder for chaining. + */ + public Builder setAttributeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + attribute_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int reportingContext_ = 0; + + /** + * + * + *
+       * Output only. The reporting context the issue applies to.
+       * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for reportingContext. + */ + @java.lang.Override + public int getReportingContextValue() { + return reportingContext_; + } + + /** + * + * + *
+       * Output only. The reporting context the issue applies to.
+       * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for reportingContext to set. + * @return This builder for chaining. + */ + public Builder setReportingContextValue(int value) { + reportingContext_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The reporting context the issue applies to.
+       * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The reportingContext. + */ + @java.lang.Override + public com.google.shopping.type.ReportingContext.ReportingContextEnum getReportingContext() { + com.google.shopping.type.ReportingContext.ReportingContextEnum result = + com.google.shopping.type.ReportingContext.ReportingContextEnum.forNumber( + reportingContext_); + return result == null + ? com.google.shopping.type.ReportingContext.ReportingContextEnum.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. The reporting context the issue applies to.
+       * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The reportingContext to set. + * @return This builder for chaining. + */ + public Builder setReportingContext( + com.google.shopping.type.ReportingContext.ReportingContextEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + reportingContext_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The reporting context the issue applies to.
+       * 
+ * + * + * .google.shopping.type.ReportingContext.ReportingContextEnum reporting_context = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearReportingContext() { + bitField0_ = (bitField0_ & ~0x00000010); + reportingContext_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + + /** + * + * + *
+       * Output only. A short issue description in English.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. A short issue description in English.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. A short issue description in English.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A short issue description in English.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A short issue description in English.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object detail_ = ""; + + /** + * + * + *
+       * Output only. A detailed issue description in English.
+       * 
+ * + * string detail = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The detail. + */ + public java.lang.String getDetail() { + java.lang.Object ref = detail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + detail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. A detailed issue description in English.
+       * 
+ * + * string detail = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for detail. + */ + public com.google.protobuf.ByteString getDetailBytes() { + java.lang.Object ref = detail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + detail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. A detailed issue description in English.
+       * 
+ * + * string detail = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The detail to set. + * @return This builder for chaining. + */ + public Builder setDetail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + detail_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A detailed issue description in English.
+       * 
+ * + * string detail = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDetail() { + detail_ = getDefaultInstance().getDetail(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. A detailed issue description in English.
+       * 
+ * + * string detail = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for detail to set. + * @return This builder for chaining. + */ + public Builder setDetailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + detail_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private java.lang.Object documentation_ = ""; + + /** + * + * + *
+       * Output only. The URL of a web page to help with resolving this issue.
+       * 
+ * + * string documentation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The documentation. + */ + public java.lang.String getDocumentation() { + java.lang.Object ref = documentation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + documentation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. The URL of a web page to help with resolving this issue.
+       * 
+ * + * string documentation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for documentation. + */ + public com.google.protobuf.ByteString getDocumentationBytes() { + java.lang.Object ref = documentation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + documentation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. The URL of a web page to help with resolving this issue.
+       * 
+ * + * string documentation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The documentation to set. + * @return This builder for chaining. + */ + public Builder setDocumentation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + documentation_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The URL of a web page to help with resolving this issue.
+       * 
+ * + * string documentation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDocumentation() { + documentation_ = getDefaultInstance().getDocumentation(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The URL of a web page to help with resolving this issue.
+       * 
+ * + * string documentation = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for documentation to set. + * @return This builder for chaining. + */ + public Builder setDocumentationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + documentation_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue) + private static final com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue(); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductReviewItemLevelIssue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int DESTINATION_STATUSES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus> + destinationStatuses_; + + /** + * + * + *
+   * Output only. The intended destinations for the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus> + getDestinationStatusesList() { + return destinationStatuses_; + } + + /** + * + * + *
+   * Output only. The intended destinations for the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatusOrBuilder> + getDestinationStatusesOrBuilderList() { + return destinationStatuses_; + } + + /** + * + * + *
+   * Output only. The intended destinations for the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getDestinationStatusesCount() { + return destinationStatuses_.size(); + } + + /** + * + * + *
+   * Output only. The intended destinations for the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + getDestinationStatuses(int index) { + return destinationStatuses_.get(index); + } + + /** + * + * + *
+   * Output only. The intended destinations for the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatusOrBuilder + getDestinationStatusesOrBuilder(int index) { + return destinationStatuses_.get(index); + } + + public static final int ITEM_LEVEL_ISSUES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private java.util.List< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue> + itemLevelIssues_; + + /** + * + * + *
+   * Output only. A list of all issues associated with the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue> + getItemLevelIssuesList() { + return itemLevelIssues_; + } + + /** + * + * + *
+   * Output only. A list of all issues associated with the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssueOrBuilder> + getItemLevelIssuesOrBuilderList() { + return itemLevelIssues_; + } + + /** + * + * + *
+   * Output only. A list of all issues associated with the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getItemLevelIssuesCount() { + return itemLevelIssues_.size(); + } + + /** + * + * + *
+   * Output only. A list of all issues associated with the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + getItemLevelIssues(int index) { + return itemLevelIssues_.get(index); + } + + /** + * + * + *
+   * Output only. A list of all issues associated with the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssueOrBuilder + getItemLevelIssuesOrBuilder(int index) { + return itemLevelIssues_.get(index); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + + /** + * + * + *
+   * Output only. Date on which the item has been created, in [ISO
+   * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. Date on which the item has been created, in [ISO
+   * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + /** + * + * + *
+   * Output only. Date on which the item has been created, in [ISO
+   * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int LAST_UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp lastUpdateTime_; + + /** + * + * + *
+   * Output only. Date on which the item has been last updated, in [ISO
+   * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+   * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastUpdateTime field is set. + */ + @java.lang.Override + public boolean hasLastUpdateTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Date on which the item has been last updated, in [ISO
+   * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+   * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastUpdateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastUpdateTime() { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + + /** + * + * + *
+   * Output only. Date on which the item has been last updated, in [ISO
+   * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+   * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < destinationStatuses_.size(); i++) { + output.writeMessage(3, destinationStatuses_.get(i)); + } + for (int i = 0; i < itemLevelIssues_.size(); i++) { + output.writeMessage(4, itemLevelIssues_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getLastUpdateTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < destinationStatuses_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, destinationStatuses_.get(i)); + } + for (int i = 0; i < itemLevelIssues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, itemLevelIssues_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getLastUpdateTime()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.shopping.merchant.reviews.v1.ProductReviewStatus)) { + return super.equals(obj); + } + com.google.shopping.merchant.reviews.v1.ProductReviewStatus other = + (com.google.shopping.merchant.reviews.v1.ProductReviewStatus) obj; + + if (!getDestinationStatusesList().equals(other.getDestinationStatusesList())) return false; + if (!getItemLevelIssuesList().equals(other.getItemLevelIssuesList())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasLastUpdateTime() != other.hasLastUpdateTime()) return false; + if (hasLastUpdateTime()) { + if (!getLastUpdateTime().equals(other.getLastUpdateTime())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDestinationStatusesCount() > 0) { + hash = (37 * hash) + DESTINATION_STATUSES_FIELD_NUMBER; + hash = (53 * hash) + getDestinationStatusesList().hashCode(); + } + if (getItemLevelIssuesCount() > 0) { + hash = (37 * hash) + ITEM_LEVEL_ISSUES_FIELD_NUMBER; + hash = (53 * hash) + getItemLevelIssuesList().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasLastUpdateTime()) { + hash = (37 * hash) + LAST_UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastUpdateTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + + /** + * + * + *
+   * Product review status.
+   * 
+ * + * Protobuf type {@code google.shopping.merchant.reviews.v1.ProductReviewStatus} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.shopping.merchant.reviews.v1.ProductReviewStatus) + com.google.shopping.merchant.reviews.v1.ProductReviewStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.class, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.Builder.class); + } + + // Construct using com.google.shopping.merchant.reviews.v1.ProductReviewStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetDestinationStatusesFieldBuilder(); + internalGetItemLevelIssuesFieldBuilder(); + internalGetCreateTimeFieldBuilder(); + internalGetLastUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (destinationStatusesBuilder_ == null) { + destinationStatuses_ = java.util.Collections.emptyList(); + } else { + destinationStatuses_ = null; + destinationStatusesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + if (itemLevelIssuesBuilder_ == null) { + itemLevelIssues_ = java.util.Collections.emptyList(); + } else { + itemLevelIssues_ = null; + itemLevelIssuesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + lastUpdateTime_ = null; + if (lastUpdateTimeBuilder_ != null) { + lastUpdateTimeBuilder_.dispose(); + lastUpdateTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto + .internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_descriptor; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus getDefaultInstanceForType() { + return com.google.shopping.merchant.reviews.v1.ProductReviewStatus.getDefaultInstance(); + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus build() { + com.google.shopping.merchant.reviews.v1.ProductReviewStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus buildPartial() { + com.google.shopping.merchant.reviews.v1.ProductReviewStatus result = + new com.google.shopping.merchant.reviews.v1.ProductReviewStatus(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus result) { + if (destinationStatusesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + destinationStatuses_ = java.util.Collections.unmodifiableList(destinationStatuses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.destinationStatuses_ = destinationStatuses_; + } else { + result.destinationStatuses_ = destinationStatusesBuilder_.build(); + } + if (itemLevelIssuesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + itemLevelIssues_ = java.util.Collections.unmodifiableList(itemLevelIssues_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.itemLevelIssues_ = itemLevelIssues_; + } else { + result.itemLevelIssues_ = itemLevelIssuesBuilder_.build(); + } + } + + private void buildPartial0(com.google.shopping.merchant.reviews.v1.ProductReviewStatus result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.lastUpdateTime_ = + lastUpdateTimeBuilder_ == null ? lastUpdateTime_ : lastUpdateTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.shopping.merchant.reviews.v1.ProductReviewStatus) { + return mergeFrom((com.google.shopping.merchant.reviews.v1.ProductReviewStatus) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.shopping.merchant.reviews.v1.ProductReviewStatus other) { + if (other == com.google.shopping.merchant.reviews.v1.ProductReviewStatus.getDefaultInstance()) + return this; + if (destinationStatusesBuilder_ == null) { + if (!other.destinationStatuses_.isEmpty()) { + if (destinationStatuses_.isEmpty()) { + destinationStatuses_ = other.destinationStatuses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDestinationStatusesIsMutable(); + destinationStatuses_.addAll(other.destinationStatuses_); + } + onChanged(); + } + } else { + if (!other.destinationStatuses_.isEmpty()) { + if (destinationStatusesBuilder_.isEmpty()) { + destinationStatusesBuilder_.dispose(); + destinationStatusesBuilder_ = null; + destinationStatuses_ = other.destinationStatuses_; + bitField0_ = (bitField0_ & ~0x00000001); + destinationStatusesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetDestinationStatusesFieldBuilder() + : null; + } else { + destinationStatusesBuilder_.addAllMessages(other.destinationStatuses_); + } + } + } + if (itemLevelIssuesBuilder_ == null) { + if (!other.itemLevelIssues_.isEmpty()) { + if (itemLevelIssues_.isEmpty()) { + itemLevelIssues_ = other.itemLevelIssues_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureItemLevelIssuesIsMutable(); + itemLevelIssues_.addAll(other.itemLevelIssues_); + } + onChanged(); + } + } else { + if (!other.itemLevelIssues_.isEmpty()) { + if (itemLevelIssuesBuilder_.isEmpty()) { + itemLevelIssuesBuilder_.dispose(); + itemLevelIssuesBuilder_ = null; + itemLevelIssues_ = other.itemLevelIssues_; + bitField0_ = (bitField0_ & ~0x00000002); + itemLevelIssuesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetItemLevelIssuesFieldBuilder() + : null; + } else { + itemLevelIssuesBuilder_.addAllMessages(other.itemLevelIssues_); + } + } + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasLastUpdateTime()) { + mergeLastUpdateTime(other.getLastUpdateTime()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: + { + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + m = + input.readMessage( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.parser(), + extensionRegistry); + if (destinationStatusesBuilder_ == null) { + ensureDestinationStatusesIsMutable(); + destinationStatuses_.add(m); + } else { + destinationStatusesBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: + { + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue + m = + input.readMessage( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.parser(), + extensionRegistry); + if (itemLevelIssuesBuilder_ == null) { + ensureItemLevelIssuesIsMutable(); + itemLevelIssues_.add(m); + } else { + itemLevelIssuesBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: + { + input.readMessage( + internalGetCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 50: + { + input.readMessage( + internalGetLastUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus> + destinationStatuses_ = java.util.Collections.emptyList(); + + private void ensureDestinationStatusesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + destinationStatuses_ = + new java.util.ArrayList< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus>(destinationStatuses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatusOrBuilder> + destinationStatusesBuilder_; + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus> + getDestinationStatusesList() { + if (destinationStatusesBuilder_ == null) { + return java.util.Collections.unmodifiableList(destinationStatuses_); + } else { + return destinationStatusesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getDestinationStatusesCount() { + if (destinationStatusesBuilder_ == null) { + return destinationStatuses_.size(); + } else { + return destinationStatusesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus + getDestinationStatuses(int index) { + if (destinationStatusesBuilder_ == null) { + return destinationStatuses_.get(index); + } else { + return destinationStatusesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDestinationStatuses( + int index, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + value) { + if (destinationStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationStatusesIsMutable(); + destinationStatuses_.set(index, value); + onChanged(); + } else { + destinationStatusesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setDestinationStatuses( + int index, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + .Builder + builderForValue) { + if (destinationStatusesBuilder_ == null) { + ensureDestinationStatusesIsMutable(); + destinationStatuses_.set(index, builderForValue.build()); + onChanged(); + } else { + destinationStatusesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDestinationStatuses( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + value) { + if (destinationStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationStatusesIsMutable(); + destinationStatuses_.add(value); + onChanged(); + } else { + destinationStatusesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDestinationStatuses( + int index, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + value) { + if (destinationStatusesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDestinationStatusesIsMutable(); + destinationStatuses_.add(index, value); + onChanged(); + } else { + destinationStatusesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDestinationStatuses( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + .Builder + builderForValue) { + if (destinationStatusesBuilder_ == null) { + ensureDestinationStatusesIsMutable(); + destinationStatuses_.add(builderForValue.build()); + onChanged(); + } else { + destinationStatusesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addDestinationStatuses( + int index, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + .Builder + builderForValue) { + if (destinationStatusesBuilder_ == null) { + ensureDestinationStatusesIsMutable(); + destinationStatuses_.add(index, builderForValue.build()); + onChanged(); + } else { + destinationStatusesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllDestinationStatuses( + java.lang.Iterable< + ? extends + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus> + values) { + if (destinationStatusesBuilder_ == null) { + ensureDestinationStatusesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, destinationStatuses_); + onChanged(); + } else { + destinationStatusesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearDestinationStatuses() { + if (destinationStatusesBuilder_ == null) { + destinationStatuses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + destinationStatusesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeDestinationStatuses(int index) { + if (destinationStatusesBuilder_ == null) { + ensureDestinationStatusesIsMutable(); + destinationStatuses_.remove(index); + onChanged(); + } else { + destinationStatusesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.Builder + getDestinationStatusesBuilder(int index) { + return internalGetDestinationStatusesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatusOrBuilder + getDestinationStatusesOrBuilder(int index) { + if (destinationStatusesBuilder_ == null) { + return destinationStatuses_.get(index); + } else { + return destinationStatusesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatusOrBuilder> + getDestinationStatusesOrBuilderList() { + if (destinationStatusesBuilder_ != null) { + return destinationStatusesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(destinationStatuses_); + } + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.Builder + addDestinationStatusesBuilder() { + return internalGetDestinationStatusesFieldBuilder() + .addBuilder( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.Builder + addDestinationStatusesBuilder(int index) { + return internalGetDestinationStatusesFieldBuilder() + .addBuilder( + index, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. The intended destinations for the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.Builder> + getDestinationStatusesBuilderList() { + return internalGetDestinationStatusesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatusOrBuilder> + internalGetDestinationStatusesFieldBuilder() { + if (destinationStatusesBuilder_ == null) { + destinationStatusesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatusOrBuilder>( + destinationStatuses_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + destinationStatuses_ = null; + } + return destinationStatusesBuilder_; + } + + private java.util.List< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue> + itemLevelIssues_ = java.util.Collections.emptyList(); + + private void ensureItemLevelIssuesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + itemLevelIssues_ = + new java.util.ArrayList< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue>(itemLevelIssues_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssueOrBuilder> + itemLevelIssuesBuilder_; + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue> + getItemLevelIssuesList() { + if (itemLevelIssuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(itemLevelIssues_); + } else { + return itemLevelIssuesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getItemLevelIssuesCount() { + if (itemLevelIssuesBuilder_ == null) { + return itemLevelIssues_.size(); + } else { + return itemLevelIssuesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + getItemLevelIssues(int index) { + if (itemLevelIssuesBuilder_ == null) { + return itemLevelIssues_.get(index); + } else { + return itemLevelIssuesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setItemLevelIssues( + int index, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + value) { + if (itemLevelIssuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemLevelIssuesIsMutable(); + itemLevelIssues_.set(index, value); + onChanged(); + } else { + itemLevelIssuesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setItemLevelIssues( + int index, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Builder + builderForValue) { + if (itemLevelIssuesBuilder_ == null) { + ensureItemLevelIssuesIsMutable(); + itemLevelIssues_.set(index, builderForValue.build()); + onChanged(); + } else { + itemLevelIssuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addItemLevelIssues( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + value) { + if (itemLevelIssuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemLevelIssuesIsMutable(); + itemLevelIssues_.add(value); + onChanged(); + } else { + itemLevelIssuesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addItemLevelIssues( + int index, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + value) { + if (itemLevelIssuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureItemLevelIssuesIsMutable(); + itemLevelIssues_.add(index, value); + onChanged(); + } else { + itemLevelIssuesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addItemLevelIssues( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Builder + builderForValue) { + if (itemLevelIssuesBuilder_ == null) { + ensureItemLevelIssuesIsMutable(); + itemLevelIssues_.add(builderForValue.build()); + onChanged(); + } else { + itemLevelIssuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addItemLevelIssues( + int index, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Builder + builderForValue) { + if (itemLevelIssuesBuilder_ == null) { + ensureItemLevelIssuesIsMutable(); + itemLevelIssues_.add(index, builderForValue.build()); + onChanged(); + } else { + itemLevelIssuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllItemLevelIssues( + java.lang.Iterable< + ? extends + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue> + values) { + if (itemLevelIssuesBuilder_ == null) { + ensureItemLevelIssuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, itemLevelIssues_); + onChanged(); + } else { + itemLevelIssuesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearItemLevelIssues() { + if (itemLevelIssuesBuilder_ == null) { + itemLevelIssues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + itemLevelIssuesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeItemLevelIssues(int index) { + if (itemLevelIssuesBuilder_ == null) { + ensureItemLevelIssuesIsMutable(); + itemLevelIssues_.remove(index); + onChanged(); + } else { + itemLevelIssuesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Builder + getItemLevelIssuesBuilder(int index) { + return internalGetItemLevelIssuesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssueOrBuilder + getItemLevelIssuesOrBuilder(int index) { + if (itemLevelIssuesBuilder_ == null) { + return itemLevelIssues_.get(index); + } else { + return itemLevelIssuesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + ? extends + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssueOrBuilder> + getItemLevelIssuesOrBuilderList() { + if (itemLevelIssuesBuilder_ != null) { + return itemLevelIssuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(itemLevelIssues_); + } + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Builder + addItemLevelIssuesBuilder() { + return internalGetItemLevelIssuesFieldBuilder() + .addBuilder( + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Builder + addItemLevelIssuesBuilder(int index) { + return internalGetItemLevelIssuesFieldBuilder() + .addBuilder( + index, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.getDefaultInstance()); + } + + /** + * + * + *
+     * Output only. A list of all issues associated with the product review.
+     * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Builder> + getItemLevelIssuesBuilderList() { + return internalGetItemLevelIssuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + .Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssueOrBuilder> + internalGetItemLevelIssuesFieldBuilder() { + if (itemLevelIssuesBuilder_ == null) { + itemLevelIssuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssue.Builder, + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssueOrBuilder>( + itemLevelIssues_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + itemLevelIssues_ = null; + } + return itemLevelIssuesBuilder_; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + + /** + * + * + *
+     * Output only. Date on which the item has been created, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. Date on which the item has been created, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Date on which the item has been created, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Date on which the item has been created, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Date on which the item has been created, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + if (createTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Date on which the item has been created, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Date on which the item has been created, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return internalGetCreateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Date on which the item has been created, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + + /** + * + * + *
+     * Output only. Date on which the item has been created, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp lastUpdateTime_; + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastUpdateTimeBuilder_; + + /** + * + * + *
+     * Output only. Date on which the item has been last updated, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastUpdateTime field is set. + */ + public boolean hasLastUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. Date on which the item has been last updated, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastUpdateTime. + */ + public com.google.protobuf.Timestamp getLastUpdateTime() { + if (lastUpdateTimeBuilder_ == null) { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } else { + return lastUpdateTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. Date on which the item has been last updated, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastUpdateTime_ = value; + } else { + lastUpdateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Date on which the item has been last updated, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTime_ = builderForValue.build(); + } else { + lastUpdateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Date on which the item has been last updated, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastUpdateTime(com.google.protobuf.Timestamp value) { + if (lastUpdateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && lastUpdateTime_ != null + && lastUpdateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getLastUpdateTimeBuilder().mergeFrom(value); + } else { + lastUpdateTime_ = value; + } + } else { + lastUpdateTimeBuilder_.mergeFrom(value); + } + if (lastUpdateTime_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. Date on which the item has been last updated, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + lastUpdateTime_ = null; + if (lastUpdateTimeBuilder_ != null) { + lastUpdateTimeBuilder_.dispose(); + lastUpdateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Date on which the item has been last updated, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetLastUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. Date on which the item has been last updated, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder() { + if (lastUpdateTimeBuilder_ != null) { + return lastUpdateTimeBuilder_.getMessageOrBuilder(); + } else { + return lastUpdateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastUpdateTime_; + } + } + + /** + * + * + *
+     * Output only. Date on which the item has been last updated, in [ISO
+     * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+     * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + internalGetLastUpdateTimeFieldBuilder() { + if (lastUpdateTimeBuilder_ == null) { + lastUpdateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastUpdateTime(), getParentForChildren(), isClean()); + lastUpdateTime_ = null; + } + return lastUpdateTimeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.shopping.merchant.reviews.v1.ProductReviewStatus) + } + + // @@protoc_insertion_point(class_scope:google.shopping.merchant.reviews.v1.ProductReviewStatus) + private static final com.google.shopping.merchant.reviews.v1.ProductReviewStatus DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.shopping.merchant.reviews.v1.ProductReviewStatus(); + } + + public static com.google.shopping.merchant.reviews.v1.ProductReviewStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProductReviewStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.shopping.merchant.reviews.v1.ProductReviewStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewStatusOrBuilder.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewStatusOrBuilder.java new file mode 100644 index 000000000000..85db8a0dbf13 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewStatusOrBuilder.java @@ -0,0 +1,265 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews_common.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +@com.google.protobuf.Generated +public interface ProductReviewStatusOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.shopping.merchant.reviews.v1.ProductReviewStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The intended destinations for the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatus> + getDestinationStatusesList(); + + /** + * + * + *
+   * Output only. The intended destinations for the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus + getDestinationStatuses(int index); + + /** + * + * + *
+   * Output only. The intended destinations for the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getDestinationStatusesCount(); + + /** + * + * + *
+   * Output only. The intended destinations for the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatusOrBuilder> + getDestinationStatusesOrBuilderList(); + + /** + * + * + *
+   * Output only. The intended destinations for the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewDestinationStatus destination_statuses = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewDestinationStatusOrBuilder + getDestinationStatusesOrBuilder(int index); + + /** + * + * + *
+   * Output only. A list of all issues associated with the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue> + getItemLevelIssuesList(); + + /** + * + * + *
+   * Output only. A list of all issues associated with the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue + getItemLevelIssues(int index); + + /** + * + * + *
+   * Output only. A list of all issues associated with the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getItemLevelIssuesCount(); + + /** + * + * + *
+   * Output only. A list of all issues associated with the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List< + ? extends + com.google.shopping.merchant.reviews.v1.ProductReviewStatus + .ProductReviewItemLevelIssueOrBuilder> + getItemLevelIssuesOrBuilderList(); + + /** + * + * + *
+   * Output only. A list of all issues associated with the product review.
+   * 
+ * + * + * repeated .google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssue item_level_issues = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.shopping.merchant.reviews.v1.ProductReviewStatus.ProductReviewItemLevelIssueOrBuilder + getItemLevelIssuesOrBuilder(int index); + + /** + * + * + *
+   * Output only. Date on which the item has been created, in [ISO
+   * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Date on which the item has been created, in [ISO
+   * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Date on which the item has been created, in [ISO
+   * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Date on which the item has been last updated, in [ISO
+   * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+   * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastUpdateTime field is set. + */ + boolean hasLastUpdateTime(); + + /** + * + * + *
+   * Output only. Date on which the item has been last updated, in [ISO
+   * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+   * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastUpdateTime. + */ + com.google.protobuf.Timestamp getLastUpdateTime(); + + /** + * + * + *
+   * Output only. Date on which the item has been last updated, in [ISO
+   * 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
+   * 
+ * + * + * .google.protobuf.Timestamp last_update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastUpdateTimeOrBuilder(); +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsCommonProto.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsCommonProto.java new file mode 100644 index 000000000000..ae64590a602c --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsCommonProto.java @@ -0,0 +1,277 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews_common.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +@com.google.protobuf.Generated +public final class ProductReviewsCommonProto extends com.google.protobuf.GeneratedFile { + private ProductReviewsCommonProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ProductReviewsCommonProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_ReviewLink_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_ReviewLink_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewDestinationStatus_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewDestinationStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewItemLevelIssue_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewItemLevelIssue_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "?google/shopping/merchant/reviews/v1/productreviews_common.proto\022#google.shoppi" + + "ng.merchant.reviews.v1\032\037google/api/field" + + "_behavior.proto\032\037google/protobuf/timestamp.proto\032" + + " google/shopping/type/types.proto\"\307\r\n" + + "\027ProductReviewAttributes\022\"\n" + + "\017aggregator_name\030\001 \001(\tB\004\342A\001\001H\000\210\001\001\022!\n" + + "\016subclient_name\030\002 \001(\tB\004\342A\001\001H\001\210\001\001\022!\n" + + "\016publisher_name\030\003 \001(\tB\004\342A\001\001H\002\210\001\001\022$\n" + + "\021publisher_favicon\030\004 \001(\tB\004\342A\001\001H\003\210\001\001\022\036\n" + + "\013reviewer_id\030\005 \001(\tB\004\342A\001\001H\004\210\001\001\022(\n" + + "\025reviewer_is_anonymous\030\006 \001(\010B\004\342A\001\001H\005\210\001\001\022$\n" + + "\021reviewer_username\030\007 \001(\tB\004\342A\001\001H\006\210\001\001\022\"\n" + + "\017review_language\030\010 \001(\tB\004\342A\001\001H\007\210\001\001\022!\n" + + "\016review_country\030\t \001(\tB\004\342A\001\001H\010\210\001\001\0225\n" + + "\013review_time\030\n" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\002\022\030\n" + + "\005title\030\013 \001(\tB\004\342A\001\001H\t\210\001\001\022\032\n" + + "\007content\030\014 \001(\tB\004\342A\001\001H\n" + + "\210\001\001\022\022\n" + + "\004pros\030\r" + + " \003(\tB\004\342A\001\001\022\022\n" + + "\004cons\030\016 \003(\tB\004\342A\001\001\022b\n" + + "\013review_link\030\017 \001(\0132G.google.shopping.merchant.revie" + + "ws.v1.ProductReviewAttributes.ReviewLinkB\004\342A\001\001\022\"\n" + + "\024reviewer_image_links\030\020 \003(\tB\004\342A\001\001\022\035\n\n" + + "min_rating\030\021 \001(\003B\004\342A\001\001H\013\210\001\001\022\035\n\n" + + "max_rating\030\022 \001(\003B\004\342A\001\001H\014\210\001\001\022\031\n" + + "\006rating\030\023 \001(\001B\004\342A\001\001H\r" + + "\210\001\001\022\033\n\r" + + "product_names\030\024 \003(\tB\004\342A\001\001\022\033\n\r" + + "product_links\030\025 \003(\tB\004\342A\001\001\022\023\n" + + "\005asins\030\026 \003(\tB\004\342A\001\001\022\023\n" + + "\005gtins\030\027 \003(\tB\004\342A\001\001\022\022\n" + + "\004mpns\030\030 \003(\tB\004\342A\001\001\022\022\n" + + "\004skus\030\031 \003(\tB\004\342A\001\001\022\024\n" + + "\006brands\030\032 \003(\tB\004\342A\001\001\022\032\n" + + "\007is_spam\030\033 \001(\010B\004\342A\001\001H\016\210\001\001\022\'\n" + + "\024is_verified_purchase\030\036 \001(\010B\004\342A\001\001H\017\210\001\001\022)\n" + + "\026is_incentivized_review\030\037 \001(\010B\004\342A\001\001H\020\210\001\001\022n\n" + + "\021collection_method\030\034 \001(\0162M.googl" + + "e.shopping.merchant.reviews.v1.ProductReviewAttributes.CollectionMethodB\004\342A\001\001\022\034\n" + + "\016transaction_id\030\035 \001(\tB\004\342A\001\001\032\272\001\n\n" + + "ReviewLink\022`\n" + + "\004type\030\001 \001(\0162L.google.shopping.merch" + + "ant.reviews.v1.ProductReviewAttributes.ReviewLink.TypeB\004\342A\001\001\022\022\n" + + "\004link\030\002 \001(\tB\004\342A\001\001\"6\n" + + "\004Type\022\024\n" + + "\020TYPE_UNSPECIFIED\020\000\022\r\n" + + "\tSINGLETON\020\001\022\t\n" + + "\005GROUP\020\002\"\\\n" + + "\020CollectionMethod\022!\n" + + "\035COLLECTION_METHOD_UNSPECIFIED\020\000\022\017\n" + + "\013UNSOLICITED\020\001\022\024\n" + + "\020POST_FULFILLMENT\020\002B\022\n" + + "\020_aggregator_nameB\021\n" + + "\017_subclient_nameB\021\n" + + "\017_publisher_nameB\024\n" + + "\022_publisher_faviconB\016\n" + + "\014_reviewer_idB\030\n" + + "\026_reviewer_is_anonymousB\024\n" + + "\022_reviewer_usernameB\022\n" + + "\020_review_languageB\021\n" + + "\017_review_countryB\010\n" + + "\006_titleB\n\n" + + "\010_contentB\r\n" + + "\013_min_ratingB\r\n" + + "\013_max_ratingB\t\n" + + "\007_ratingB\n\n" + + "\010_is_spamB\027\n" + + "\025_is_verified_purchaseB\031\n" + + "\027_is_incentivized_review\"\317\007\n" + + "\023ProductReviewStatus\022{\n" + + "\024destination_statuses\030\003 \003(\0132W.goo" + + "gle.shopping.merchant.reviews.v1.Product" + + "ReviewStatus.ProductReviewDestinationStatusB\004\342A\001\003\022u\n" + + "\021item_level_issues\030\004 \003(\0132T.google.shopping.merchant.reviews.v1.Produ" + + "ctReviewStatus.ProductReviewItemLevelIssueB\004\342A\001\003\0225\n" + + "\013create_time\030\005" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022:\n" + + "\020last_update_time\030\006" + + " \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\032~\n" + + "\036ProductReviewDestinationStatus\022\\\n" + + "\021reporting_context\030\001 \001(\0162;.google.shoppi" + + "ng.type.ReportingContext.ReportingContextEnumB\004\342A\001\003\032\320\003\n" + + "\033ProductReviewItemLevelIssue\022\022\n" + + "\004code\030\001 \001(\tB\004\342A\001\003\022u\n" + + "\010severity\030\002 \001(\0162].google.shopping.merchant.reviews.v1." + + "ProductReviewStatus.ProductReviewItemLevelIssue.SeverityB\004\342A\001\003\022\030\n\n" + + "resolution\030\003 \001(\tB\004\342A\001\003\022\027\n" + + "\tattribute\030\004 \001(\tB\004\342A\001\003\022\\\n" + + "\021reporting_context\030\005 \001(\0162;.google.shopping.t" + + "ype.ReportingContext.ReportingContextEnumB\004\342A\001\003\022\031\n" + + "\013description\030\006 \001(\tB\004\342A\001\003\022\024\n" + + "\006detail\030\007 \001(\tB\004\342A\001\003\022\033\n\r" + + "documentation\030\010 \001(\tB\004\342A\001\003\"G\n" + + "\010Severity\022\030\n" + + "\024SEVERITY_UNSPECIFIED\020\000\022\020\n" + + "\014NOT_IMPACTED\020\001\022\017\n" + + "\013DISAPPROVED\020\002B\205\002\n" + + "\'com.google.shopping.merchant.reviews.v1B\031ProductReviewsCommonProtoP\001ZGcloud.g" + + "oogle.com/go/shopping/merchant/reviews/apiv1/reviewspb;reviewspb\252\002#Google.Shoppi" + + "ng.Merchant.Reviews.V1\312\002#Google\\Shopping" + + "\\Merchant\\Reviews\\V1\352\002\'Google::Shopping::Merchant::Reviews::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.shopping.type.TypesProto.getDescriptor(), + }); + internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_descriptor, + new java.lang.String[] { + "AggregatorName", + "SubclientName", + "PublisherName", + "PublisherFavicon", + "ReviewerId", + "ReviewerIsAnonymous", + "ReviewerUsername", + "ReviewLanguage", + "ReviewCountry", + "ReviewTime", + "Title", + "Content", + "Pros", + "Cons", + "ReviewLink", + "ReviewerImageLinks", + "MinRating", + "MaxRating", + "Rating", + "ProductNames", + "ProductLinks", + "Asins", + "Gtins", + "Mpns", + "Skus", + "Brands", + "IsSpam", + "IsVerifiedPurchase", + "IsIncentivizedReview", + "CollectionMethod", + "TransactionId", + }); + internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_ReviewLink_descriptor = + internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_descriptor + .getNestedType(0); + internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_ReviewLink_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_shopping_merchant_reviews_v1_ProductReviewAttributes_ReviewLink_descriptor, + new java.lang.String[] { + "Type", "Link", + }); + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_descriptor, + new java.lang.String[] { + "DestinationStatuses", "ItemLevelIssues", "CreateTime", "LastUpdateTime", + }); + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewDestinationStatus_descriptor = + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_descriptor + .getNestedType(0); + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewDestinationStatus_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewDestinationStatus_descriptor, + new java.lang.String[] { + "ReportingContext", + }); + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewItemLevelIssue_descriptor = + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_descriptor + .getNestedType(1); + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewItemLevelIssue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_shopping_merchant_reviews_v1_ProductReviewStatus_ProductReviewItemLevelIssue_descriptor, + new java.lang.String[] { + "Code", + "Severity", + "Resolution", + "Attribute", + "ReportingContext", + "Description", + "Detail", + "Documentation", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.shopping.type.TypesProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsProto.java b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsProto.java new file mode 100644 index 000000000000..a450e574f675 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/java/com/google/shopping/merchant/reviews/v1/ProductReviewsProto.java @@ -0,0 +1,229 @@ +/* + * 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. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/shopping/merchant/reviews/v1/productreviews.proto +// Protobuf Java Version: 4.33.6 + +package com.google.shopping.merchant.reviews.v1; + +@com.google.protobuf.Generated +public final class ProductReviewsProto extends com.google.protobuf.GeneratedFile { + private ProductReviewsProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 6, + /* suffix= */ "", + "ProductReviewsProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reviews_v1_GetProductReviewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_shopping_merchant_reviews_v1_GetProductReviewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reviews_v1_DeleteProductReviewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_shopping_merchant_reviews_v1_DeleteProductReviewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reviews_v1_InsertProductReviewRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_shopping_merchant_reviews_v1_InsertProductReviewRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_shopping_merchant_reviews_v1_ProductReview_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_shopping_merchant_reviews_v1_ProductReview_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n" + + "8google/shopping/merchant/reviews/v1/productreviews.proto\022#google.shopping.merc" + + "hant.reviews.v1\032\034google/api/annotations." + + "proto\032\027google/api/client.proto\032\037google/a" + + "pi/field_behavior.proto\032\031google/api/reso" + + "urce.proto\032\033google/protobuf/empty.proto\032" + + "?google/shopping/merchant/reviews/v1/productreviews_common.proto\032" + + " google/shopping/type/types.proto\"Z\n" + + "\027GetProductReviewRequest\022?\n" + + "\004name\030\001 \001(\tB1\342A\001\002\372A*\n" + + "(merchantapi.googleapis.com/ProductReview\"]\n" + + "\032DeleteProductReviewRequest\022?\n" + + "\004name\030\001 \001(\tB1\342A\001\002\372A*\n" + + "(merchantapi.googleapis.com/ProductReview\"\221\001\n" + + "\031ListProductReviewsRequest\022A\n" + + "\006parent\030\001 \001(" + + "\tB1\342A\001\002\372A*\022(merchantapi.googleapis.com/ProductReview\022\027\n" + + "\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\n" + + "page_token\030\003 \001(\tB\004\342A\001\001\"\237\001\n" + + "\032InsertProductReviewRequest\022\024\n" + + "\006parent\030\001 \001(\tB\004\342A\001\002\022P\n" + + "\016product_review\030\002 \001(\01322.google." + + "shopping.merchant.reviews.v1.ProductReviewB\004\342A\001\002\022\031\n" + + "\013data_source\030\003 \001(\tB\004\342A\001\002\"\202\001\n" + + "\032ListProductReviewsResponse\022K\n" + + "\017product_reviews\030\001" + + " \003(\01322.google.shopping.merchant.reviews.v1.ProductReview\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\356\003\n\r" + + "ProductReview\022\022\n" + + "\004name\030\001 \001(\tB\004\342A\001\010\022\037\n" + + "\021product_review_id\030\002 \001(\tB\004\342A\001\002\022e\n" + + "\031product_review_attributes\030\003 \001(\0132<.goo" + + "gle.shopping.merchant.reviews.v1.ProductReviewAttributesB\004\342A\001\001\022F\n" + + "\021custom_attributes\030\004" + + " \003(\0132%.google.shopping.type.CustomAttributeB\004\342A\001\001\022\031\n" + + "\013data_source\030\005 \001(\tB\004\342A\001\003\022]\n" + + "\025product_review_status\030\006 \001(\01328.googl" + + "e.shopping.merchant.reviews.v1.ProductReviewStatusB\004\342A\001\003:\177\352A|\n" + + "(merchantapi.googleapis.com/ProductReview\0221accounts/{accou" + + "nt}/productReviews/{productreview}*\016productReviews2\r" + + "productReview2\213\007\n" + + "\025ProductReviewsService\022\303\001\n" + + "\020GetProductReview\022<.google.shopping.merchant.reviews.v1.GetProduc" + + "tReviewRequest\0322.google.shopping.merchan" + + "t.reviews.v1.ProductReview\"=\332A\004name\202\323\344\223\002" + + "0\022./reviews/v1/{name=accounts/*/productReviews/*}\022\326\001\n" + + "\022ListProductReviews\022>.google.shopping.merchant.reviews.v1.ListProdu" + + "ctReviewsRequest\032?.google.shopping.merchant.reviews.v1.ListProductReviewsRespons" + + "e\"?\332A\006parent\202\323\344\223\0020\022./reviews/v1/{parent=accounts/*}/productReviews\022\331\001\n" + + "\023InsertProductReview\022?.google.shopping.merchant.re" + + "views.v1.InsertProductReviewRequest\0322.google.shopping.merchant.reviews.v1.Produc" + + "tReview\"M\202\323\344\223\002G\"5/reviews/v1/{parent=acc" + + "ounts/*}/productReviews:insert:\016product_review\022\255\001\n" + + "\023DeleteProductReview\022?.google.shopping.merchant.reviews.v1.DeleteProdu" + + "ctReviewRequest\032\026.google.protobuf.Empty\"" + + "=\332A\004name\202\323\344\223\0020*./reviews/v1/{name=accoun" + + "ts/*/productReviews/*}\032G\312A\032merchantapi.g" + + "oogleapis.com\322A\'https://www.googleapis.com/auth/contentB\272\002\n" + + "\'com.google.shopping.merchant.reviews.v1B\023ProductReviewsProto" + + "P\001ZGcloud.google.com/go/shopping/merchan" + + "t/reviews/apiv1/reviewspb;reviewspb\252\002#Go" + + "ogle.Shopping.Merchant.Reviews.V1\312\002#Goog" + + "le\\Shopping\\Merchant\\Reviews\\V1\352\002\'Google::Shopping::Merchant::Reviews::V1\352A8\n" + + "\"merchantapi.googleapis.com/Account\022\022accounts/{account}b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto.getDescriptor(), + com.google.shopping.type.TypesProto.getDescriptor(), + }); + internal_static_google_shopping_merchant_reviews_v1_GetProductReviewRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_shopping_merchant_reviews_v1_GetProductReviewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_shopping_merchant_reviews_v1_GetProductReviewRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_shopping_merchant_reviews_v1_DeleteProductReviewRequest_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_shopping_merchant_reviews_v1_DeleteProductReviewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_shopping_merchant_reviews_v1_DeleteProductReviewRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsRequest_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_shopping_merchant_reviews_v1_InsertProductReviewRequest_descriptor = + getDescriptor().getMessageType(3); + internal_static_google_shopping_merchant_reviews_v1_InsertProductReviewRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_shopping_merchant_reviews_v1_InsertProductReviewRequest_descriptor, + new java.lang.String[] { + "Parent", "ProductReview", "DataSource", + }); + internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsResponse_descriptor = + getDescriptor().getMessageType(4); + internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_shopping_merchant_reviews_v1_ListProductReviewsResponse_descriptor, + new java.lang.String[] { + "ProductReviews", "NextPageToken", + }); + internal_static_google_shopping_merchant_reviews_v1_ProductReview_descriptor = + getDescriptor().getMessageType(5); + internal_static_google_shopping_merchant_reviews_v1_ProductReview_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_shopping_merchant_reviews_v1_ProductReview_descriptor, + new java.lang.String[] { + "Name", + "ProductReviewId", + "ProductReviewAttributes", + "CustomAttributes", + "DataSource", + "ProductReviewStatus", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.shopping.merchant.reviews.v1.ProductReviewsCommonProto.getDescriptor(); + com.google.shopping.type.TypesProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/proto/google/shopping/merchant/reviews/v1/productreviews.proto b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/proto/google/shopping/merchant/reviews/v1/productreviews.proto new file mode 100644 index 000000000000..ab0451954dbe --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/proto/google/shopping/merchant/reviews/v1/productreviews.proto @@ -0,0 +1,185 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.shopping.merchant.reviews.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/empty.proto"; +import "google/shopping/merchant/reviews/v1/productreviews_common.proto"; +import "google/shopping/type/types.proto"; + +option csharp_namespace = "Google.Shopping.Merchant.Reviews.V1"; +option go_package = "cloud.google.com/go/shopping/merchant/reviews/apiv1/reviewspb;reviewspb"; +option java_multiple_files = true; +option java_outer_classname = "ProductReviewsProto"; +option java_package = "com.google.shopping.merchant.reviews.v1"; +option php_namespace = "Google\\Shopping\\Merchant\\Reviews\\V1"; +option ruby_package = "Google::Shopping::Merchant::Reviews::V1"; +option (google.api.resource_definition) = { + type: "merchantapi.googleapis.com/Account" + pattern: "accounts/{account}" +}; + +// Service to manage product reviews. +service ProductReviewsService { + option (google.api.default_host) = "merchantapi.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/content"; + + // Gets a product review. + rpc GetProductReview(GetProductReviewRequest) returns (ProductReview) { + option (google.api.http) = { + get: "/reviews/v1/{name=accounts/*/productReviews/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists product reviews. + rpc ListProductReviews(ListProductReviewsRequest) + returns (ListProductReviewsResponse) { + option (google.api.http) = { + get: "/reviews/v1/{parent=accounts/*}/productReviews" + }; + option (google.api.method_signature) = "parent"; + } + + // Inserts a product review. + rpc InsertProductReview(InsertProductReviewRequest) returns (ProductReview) { + option (google.api.http) = { + post: "/reviews/v1/{parent=accounts/*}/productReviews:insert" + body: "product_review" + }; + } + + // Deletes a product review. + rpc DeleteProductReview(DeleteProductReviewRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/reviews/v1/{name=accounts/*/productReviews/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for the GetProductReview method. +message GetProductReviewRequest { + // Required. The ID of the merchant review. + // Format: accounts/{account}/productReviews/{productReview} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "merchantapi.googleapis.com/ProductReview" + } + ]; +} + +// Request message for the `DeleteProductReview` method. +message DeleteProductReviewRequest { + // Required. The ID of the Product review. + // Format: accounts/{account}/productReviews/{productReview} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "merchantapi.googleapis.com/ProductReview" + } + ]; +} + +// Request message for the ListProductReviews method. +message ListProductReviewsRequest { + // Required. The account to list product reviews for. + // Format: accounts/{account} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "merchantapi.googleapis.com/ProductReview" + } + ]; + + // Optional. The maximum number of products to return. The service may return + // fewer than this value. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `ListProductReviews` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListProductReviews` + // must match the call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for the `InsertProductReview` method. +message InsertProductReviewRequest { + // Required. The account where the product review will be inserted. + // Format: accounts/{account} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The product review to insert. + ProductReview product_review = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Format: + // `accounts/{account}/dataSources/{datasource}`. + string data_source = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// response message for the ListProductReviews method. +message ListProductReviewsResponse { + // The product review. + repeated ProductReview product_reviews = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// A review for a product. For more information, see +// [Introduction to Product Review +// Feeds](https://developers.google.com/product-review-feeds) +message ProductReview { + option (google.api.resource) = { + type: "merchantapi.googleapis.com/ProductReview" + pattern: "accounts/{account}/productReviews/{productreview}" + plural: "productReviews" + singular: "productReview" + }; + + // Identifier. The name of the product review. + // Format: + // `"{productreview.name=accounts/{account}/productReviews/{productReview}}"` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. The permanent, unique identifier for the product review in the + // publisher’s system. + string product_review_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A list of product review attributes. + ProductReviewAttributes product_review_attributes = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of custom (merchant-provided) attributes. + repeated google.shopping.type.CustomAttribute custom_attributes = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The primary data source of the product review. + string data_source = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The status of a product review, data validation issues, that + // is, information about a product review computed asynchronously. + ProductReviewStatus product_review_status = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/proto/google/shopping/merchant/reviews/v1/productreviews_common.proto b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/proto/google/shopping/merchant/reviews/v1/productreviews_common.proto new file mode 100644 index 000000000000..3797a025df93 --- /dev/null +++ b/java-shopping-merchant-reviews/proto-google-shopping-merchant-reviews-v1/src/main/proto/google/shopping/merchant/reviews/v1/productreviews_common.proto @@ -0,0 +1,273 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.shopping.merchant.reviews.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; +import "google/shopping/type/types.proto"; + +option csharp_namespace = "Google.Shopping.Merchant.Reviews.V1"; +option go_package = "cloud.google.com/go/shopping/merchant/reviews/apiv1/reviewspb;reviewspb"; +option java_multiple_files = true; +option java_outer_classname = "ProductReviewsCommonProto"; +option java_package = "com.google.shopping.merchant.reviews.v1"; +option php_namespace = "Google\\Shopping\\Merchant\\Reviews\\V1"; +option ruby_package = "Google::Shopping::Merchant::Reviews::V1"; + +// Attributes. +message ProductReviewAttributes { + // The URI of the review landing page. + message ReviewLink { + // Type of the review URI. + enum Type { + // Type unspecified. + TYPE_UNSPECIFIED = 0; + + // The review page contains only this single review. + SINGLETON = 1; + + // The review page contains a group of reviews including this review. + GROUP = 2; + } + + // Optional. Type of the review URI. + Type type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URI of the review landing page. + // For example: `http://www.example.com/review_5.html`. + string link = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // The method used to collect the review. + enum CollectionMethod { + // Collection method unspecified. + COLLECTION_METHOD_UNSPECIFIED = 0; + + // The user was not responding to a specific solicitation when they + // submitted the review. + UNSOLICITED = 1; + + // The user submitted the review in response to a solicitation after + // fulfillment of the user's order. + POST_FULFILLMENT = 2; + } + + // Optional. The name of the aggregator of the product reviews. + // + // A publisher may use a reviews aggregator to manage reviews and provide + // the feeds. This element indicates the use of an aggregator and contains + // information about the aggregator. + optional string aggregator_name = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the subclient of the product reviews. + // + // The subclient is an identifier of the product review source. + // It should be equivalent to the directory provided in the file data source + // path. + optional string subclient_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the publisher of the product reviews. + // + // The information about the publisher, which may be a retailer, + // manufacturer, reviews service company, or any entity that publishes + // product reviews. + optional string publisher_name = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A link to the company favicon of the publisher. The image + // dimensions should be favicon size: 16x16 pixels. The image format should be + // GIF, JPG or PNG. + optional string publisher_favicon = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The author of the product review. + // + // A permanent, unique identifier for the author of the review in the + // publisher's system. + optional string reviewer_id = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Set to true if the reviewer should remain anonymous. + optional bool reviewer_is_anonymous = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the reviewer of the product review. + optional string reviewer_username = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The language of the review defined by BCP-47 language code. + optional string review_language = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The country of the review defined by ISO 3166-1 Alpha-2 Country + // Code. + optional string review_country = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The timestamp indicating when the review was written. + google.protobuf.Timestamp review_time = 10 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The title of the review. + optional string title = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The content of the review. If empty, the content might still get + // populated from pros and cons. + optional string content = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains the advantages based on the opinion of the reviewer. + // Omit boilerplate text like "pro:" unless it was written by the reviewer. + repeated string pros = 13 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains the disadvantages based on the opinion of the reviewer. + // Omit boilerplate text like "con:" unless it was written by the reviewer. + repeated string cons = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URI of the review landing page. + ReviewLink review_link = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A URI to an image of the reviewed product created by the review + // author. The URI does not have to end with an image file extension. + repeated string reviewer_image_links = 16 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains the ratings associated with the review. + // The minimum possible number for the rating. This should be the worst + // possible rating and should not be a value for no rating. + optional int64 min_rating = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum possible number for the rating. The value of the max + // rating must be greater than the value of the min attribute. + optional int64 max_rating = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The reviewer's overall rating of the product. + optional double rating = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Descriptive name of a product. + repeated string product_names = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The URI of the product. This URI can have the same value as the + // `review_link` element, if the review URI and the product URI are the + // same. + repeated string product_links = 21 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains ASINs (Amazon Standard Identification Numbers) + // associated with a product. + repeated string asins = 22 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains GTINs (global trade item numbers) associated with a + // product. Sub-types of GTINs (e.g. UPC, EAN, ISBN, JAN) are supported. + repeated string gtins = 23 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains MPNs (manufacturer part numbers) associated with a + // product. + repeated string mpns = 24 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains SKUs (stock keeping units) associated with a product. + // Often this matches the product Offer Id in the product feed. + repeated string skus = 25 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains brand names associated with a product. + repeated string brands = 26 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether the review is marked as spam in the publisher's + // system. + optional bool is_spam = 27 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether the reviewer's purchase is verified. + optional bool is_verified_purchase = 30 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Indicates whether the review is incentivized. + optional bool is_incentivized_review = 31 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The method used to collect the review. + CollectionMethod collection_method = 28 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A permanent, unique identifier for the transaction associated + // with the review in the publisher's system. This ID can be used to indicate + // that multiple reviews are associated with the same transaction. + string transaction_id = 29 [(google.api.field_behavior) = OPTIONAL]; +} + +// Product review status. +message ProductReviewStatus { + // The destination status of the product review status. + message ProductReviewDestinationStatus { + // Output only. The name of the reporting context. + google.shopping.type.ReportingContext.ReportingContextEnum + reporting_context = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The ItemLevelIssue of the product review status. + message ProductReviewItemLevelIssue { + // How the issue affects the serving of the product review. + enum Severity { + // Not specified. + SEVERITY_UNSPECIFIED = 0; + + // This issue represents a warning and does not have a direct affect + // on the product review. + NOT_IMPACTED = 1; + + // Issue disapproves the product review. + DISAPPROVED = 2; + } + + // Output only. The error code of the issue. + string code = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. How this issue affects serving of the product review. + Severity severity = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether the issue can be resolved by the merchant. + string resolution = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The attribute's name, if the issue is caused by a single + // attribute. + string attribute = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The reporting context the issue applies to. + google.shopping.type.ReportingContext.ReportingContextEnum + reporting_context = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A short issue description in English. + string description = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A detailed issue description in English. + string detail = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The URL of a web page to help with resolving this issue. + string documentation = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The intended destinations for the product review. + repeated ProductReviewDestinationStatus destination_statuses = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A list of all issues associated with the product review. + repeated ProductReviewItemLevelIssue item_level_issues = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Date on which the item has been created, in [ISO + // 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Date on which the item has been last updated, in [ISO + // 8601](http://en.wikipedia.org/wiki/ISO_8601) format. + google.protobuf.Timestamp last_update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/create/SyncCreateSetCredentialsProvider.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..6acf274f5d6d --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceSettings; +import com.google.shopping.merchant.reviews.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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); + } +} +// [END merchantapi_v1_generated_ProductReviewsService_Create_SetCredentialsProvider_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/create/SyncCreateSetEndpoint.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..11e06af20439 --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_Create_SetEndpoint_sync] +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceSettings; +import com.google.shopping.merchant.reviews.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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); + } +} +// [END merchantapi_v1_generated_ProductReviewsService_Create_SetEndpoint_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/create/SyncCreateUseHttpJsonTransport.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..863dfac4eca4 --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_Create_UseHttpJsonTransport_sync] +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // 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); + } +} +// [END merchantapi_v1_generated_ProductReviewsService_Create_UseHttpJsonTransport_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/deleteproductreview/AsyncDeleteProductReview.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/deleteproductreview/AsyncDeleteProductReview.java new file mode 100644 index 000000000000..791672599743 --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/deleteproductreview/AsyncDeleteProductReview.java @@ -0,0 +1,51 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_DeleteProductReview_async] +import com.google.api.core.ApiFuture; +import com.google.protobuf.Empty; +import com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.ProductReviewName; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class AsyncDeleteProductReview { + + public static void main(String[] args) throws Exception { + asyncDeleteProductReview(); + } + + public static void asyncDeleteProductReview() throws Exception { + // 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(); + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_DeleteProductReview_async] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/deleteproductreview/SyncDeleteProductReview.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/deleteproductreview/SyncDeleteProductReview.java new file mode 100644 index 000000000000..7a463e154718 --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/deleteproductreview/SyncDeleteProductReview.java @@ -0,0 +1,47 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_DeleteProductReview_sync] +import com.google.protobuf.Empty; +import com.google.shopping.merchant.reviews.v1.DeleteProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.ProductReviewName; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class SyncDeleteProductReview { + + public static void main(String[] args) throws Exception { + syncDeleteProductReview(); + } + + public static void syncDeleteProductReview() throws Exception { + // 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); + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_DeleteProductReview_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/deleteproductreview/SyncDeleteProductReviewProductreviewname.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/deleteproductreview/SyncDeleteProductReviewProductreviewname.java new file mode 100644 index 000000000000..1e391301d782 --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/deleteproductreview/SyncDeleteProductReviewProductreviewname.java @@ -0,0 +1,43 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_DeleteProductReview_Productreviewname_sync] +import com.google.protobuf.Empty; +import com.google.shopping.merchant.reviews.v1.ProductReviewName; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class SyncDeleteProductReviewProductreviewname { + + public static void main(String[] args) throws Exception { + syncDeleteProductReviewProductreviewname(); + } + + public static void syncDeleteProductReviewProductreviewname() throws Exception { + // 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); + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_DeleteProductReview_Productreviewname_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/deleteproductreview/SyncDeleteProductReviewString.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/deleteproductreview/SyncDeleteProductReviewString.java new file mode 100644 index 000000000000..282a9a6e68af --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/deleteproductreview/SyncDeleteProductReviewString.java @@ -0,0 +1,43 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_DeleteProductReview_String_sync] +import com.google.protobuf.Empty; +import com.google.shopping.merchant.reviews.v1.ProductReviewName; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class SyncDeleteProductReviewString { + + public static void main(String[] args) throws Exception { + syncDeleteProductReviewString(); + } + + public static void syncDeleteProductReviewString() throws Exception { + // 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); + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_DeleteProductReview_String_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/getproductreview/AsyncGetProductReview.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/getproductreview/AsyncGetProductReview.java new file mode 100644 index 000000000000..35808786baf7 --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/getproductreview/AsyncGetProductReview.java @@ -0,0 +1,51 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_GetProductReview_async] +import com.google.api.core.ApiFuture; +import com.google.shopping.merchant.reviews.v1.GetProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import com.google.shopping.merchant.reviews.v1.ProductReviewName; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class AsyncGetProductReview { + + public static void main(String[] args) throws Exception { + asyncGetProductReview(); + } + + public static void asyncGetProductReview() throws Exception { + // 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(); + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_GetProductReview_async] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/getproductreview/SyncGetProductReview.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/getproductreview/SyncGetProductReview.java new file mode 100644 index 000000000000..fb2d25531153 --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/getproductreview/SyncGetProductReview.java @@ -0,0 +1,47 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_GetProductReview_sync] +import com.google.shopping.merchant.reviews.v1.GetProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import com.google.shopping.merchant.reviews.v1.ProductReviewName; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class SyncGetProductReview { + + public static void main(String[] args) throws Exception { + syncGetProductReview(); + } + + public static void syncGetProductReview() throws Exception { + // 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); + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_GetProductReview_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/getproductreview/SyncGetProductReviewProductreviewname.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/getproductreview/SyncGetProductReviewProductreviewname.java new file mode 100644 index 000000000000..87ca89cdf1dc --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/getproductreview/SyncGetProductReviewProductreviewname.java @@ -0,0 +1,43 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_GetProductReview_Productreviewname_sync] +import com.google.shopping.merchant.reviews.v1.ProductReview; +import com.google.shopping.merchant.reviews.v1.ProductReviewName; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class SyncGetProductReviewProductreviewname { + + public static void main(String[] args) throws Exception { + syncGetProductReviewProductreviewname(); + } + + public static void syncGetProductReviewProductreviewname() throws Exception { + // 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); + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_GetProductReview_Productreviewname_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/getproductreview/SyncGetProductReviewString.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/getproductreview/SyncGetProductReviewString.java new file mode 100644 index 000000000000..505e430d1e68 --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/getproductreview/SyncGetProductReviewString.java @@ -0,0 +1,43 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_GetProductReview_String_sync] +import com.google.shopping.merchant.reviews.v1.ProductReview; +import com.google.shopping.merchant.reviews.v1.ProductReviewName; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class SyncGetProductReviewString { + + public static void main(String[] args) throws Exception { + syncGetProductReviewString(); + } + + public static void syncGetProductReviewString() throws Exception { + // 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); + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_GetProductReview_String_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/insertproductreview/AsyncInsertProductReview.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/insertproductreview/AsyncInsertProductReview.java new file mode 100644 index 000000000000..465d6e9b5e07 --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/insertproductreview/AsyncInsertProductReview.java @@ -0,0 +1,52 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_InsertProductReview_async] +import com.google.api.core.ApiFuture; +import com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class AsyncInsertProductReview { + + public static void main(String[] args) throws Exception { + asyncInsertProductReview(); + } + + public static void asyncInsertProductReview() throws Exception { + // 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(); + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_InsertProductReview_async] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/insertproductreview/SyncInsertProductReview.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/insertproductreview/SyncInsertProductReview.java new file mode 100644 index 000000000000..2cb4db92d4df --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/insertproductreview/SyncInsertProductReview.java @@ -0,0 +1,48 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_InsertProductReview_sync] +import com.google.shopping.merchant.reviews.v1.InsertProductReviewRequest; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class SyncInsertProductReview { + + public static void main(String[] args) throws Exception { + syncInsertProductReview(); + } + + public static void syncInsertProductReview() throws Exception { + // 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); + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_InsertProductReview_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/AsyncListProductReviews.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/AsyncListProductReviews.java new file mode 100644 index 000000000000..9cc532a2600e --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/AsyncListProductReviews.java @@ -0,0 +1,55 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_ListProductReviews_async] +import com.google.api.core.ApiFuture; +import com.google.shopping.merchant.reviews.v1.AccountName; +import com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class AsyncListProductReviews { + + public static void main(String[] args) throws Exception { + asyncListProductReviews(); + } + + public static void asyncListProductReviews() throws Exception { + // 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); + } + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_ListProductReviews_async] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/AsyncListProductReviewsPaged.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/AsyncListProductReviewsPaged.java new file mode 100644 index 000000000000..ced3b4f93718 --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/AsyncListProductReviewsPaged.java @@ -0,0 +1,63 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_ListProductReviews_Paged_async] +import com.google.common.base.Strings; +import com.google.shopping.merchant.reviews.v1.AccountName; +import com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest; +import com.google.shopping.merchant.reviews.v1.ListProductReviewsResponse; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class AsyncListProductReviewsPaged { + + public static void main(String[] args) throws Exception { + asyncListProductReviewsPaged(); + } + + public static void asyncListProductReviewsPaged() throws Exception { + // 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; + } + } + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_ListProductReviews_Paged_async] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/SyncListProductReviews.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/SyncListProductReviews.java new file mode 100644 index 000000000000..81f6b8f7ed0f --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/SyncListProductReviews.java @@ -0,0 +1,52 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_ListProductReviews_sync] +import com.google.shopping.merchant.reviews.v1.AccountName; +import com.google.shopping.merchant.reviews.v1.ListProductReviewsRequest; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class SyncListProductReviews { + + public static void main(String[] args) throws Exception { + syncListProductReviews(); + } + + public static void syncListProductReviews() throws Exception { + // 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); + } + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_ListProductReviews_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/SyncListProductReviewsAccountname.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/SyncListProductReviewsAccountname.java new file mode 100644 index 000000000000..637acc98a94e --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/SyncListProductReviewsAccountname.java @@ -0,0 +1,46 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_ListProductReviews_Accountname_sync] +import com.google.shopping.merchant.reviews.v1.AccountName; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class SyncListProductReviewsAccountname { + + public static void main(String[] args) throws Exception { + syncListProductReviewsAccountname(); + } + + public static void syncListProductReviewsAccountname() throws Exception { + // 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); + } + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_ListProductReviews_Accountname_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/SyncListProductReviewsString.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/SyncListProductReviewsString.java new file mode 100644 index 000000000000..3f6902dba3b8 --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservice/listproductreviews/SyncListProductReviewsString.java @@ -0,0 +1,46 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsService_ListProductReviews_String_sync] +import com.google.shopping.merchant.reviews.v1.AccountName; +import com.google.shopping.merchant.reviews.v1.ProductReview; +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceClient; + +public class SyncListProductReviewsString { + + public static void main(String[] args) throws Exception { + syncListProductReviewsString(); + } + + public static void syncListProductReviewsString() throws Exception { + // 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); + } + } + } +} +// [END merchantapi_v1_generated_ProductReviewsService_ListProductReviews_String_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservicesettings/getproductreview/SyncGetProductReview.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservicesettings/getproductreview/SyncGetProductReview.java new file mode 100644 index 000000000000..22f9abf78b8b --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/productreviewsservicesettings/getproductreview/SyncGetProductReview.java @@ -0,0 +1,57 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsServiceSettings_GetProductReview_sync] +import com.google.shopping.merchant.reviews.v1.ProductReviewsServiceSettings; +import java.time.Duration; + +public class SyncGetProductReview { + + public static void main(String[] args) throws Exception { + syncGetProductReview(); + } + + public static void syncGetProductReview() throws Exception { + // 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(); + } +} +// [END merchantapi_v1_generated_ProductReviewsServiceSettings_GetProductReview_sync] diff --git a/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/stub/productreviewsservicestubsettings/getproductreview/SyncGetProductReview.java b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/stub/productreviewsservicestubsettings/getproductreview/SyncGetProductReview.java new file mode 100644 index 000000000000..b115586c607c --- /dev/null +++ b/java-shopping-merchant-reviews/samples/snippets/generated/com/google/shopping/merchant/reviews/v1/stub/productreviewsservicestubsettings/getproductreview/SyncGetProductReview.java @@ -0,0 +1,57 @@ +/* + * 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.samples; + +// [START merchantapi_v1_generated_ProductReviewsServiceStubSettings_GetProductReview_sync] +import com.google.shopping.merchant.reviews.v1.stub.ProductReviewsServiceStubSettings; +import java.time.Duration; + +public class SyncGetProductReview { + + public static void main(String[] args) throws Exception { + syncGetProductReview(); + } + + public static void syncGetProductReview() throws Exception { + // 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(); + } +} +// [END merchantapi_v1_generated_ProductReviewsServiceStubSettings_GetProductReview_sync] diff --git a/librarian.yaml b/librarian.yaml index e28da4e4ce6f..6e32d5eb5179 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -5314,11 +5314,13 @@ libraries: - name: shopping-merchant-reviews version: 0.46.0-SNAPSHOT apis: + - path: google/shopping/merchant/reviews/v1 - path: google/shopping/merchant/reviews/v1beta java: api_description_override: Programmatically manage your Merchant Center Accounts. artifact_id: google-shopping-merchant-reviews client_documentation_override: https://cloud.google.com/java/docs/reference/google-shopping-merchant-reviews/latest/overview + group_id: com.google.shopping library_type_override: GAPIC_AUTO name_pretty_override: Merchant API product_documentation_override: https://developers.google.com/merchant/api diff --git a/versions.txt b/versions.txt index fa966701951c..50c1b0404ca9 100644 --- a/versions.txt +++ b/versions.txt @@ -1120,3 +1120,5 @@ proto-google-cloud-backupdr-v1beta:0.58.0:0.59.0-SNAPSHOT proto-google-cloud-networkservices-v1beta1:0.55.0:0.56.0-SNAPSHOT grpc-google-cloud-health-v4beta:0.8.0:0.9.0-SNAPSHOT proto-google-cloud-health-v4beta:0.8.0:0.9.0-SNAPSHOT +proto-google-shopping-merchant-reviews-v1:0.45.0:0.46.0-SNAPSHOT +grpc-google-shopping-merchant-reviews-v1:0.45.0:0.46.0-SNAPSHOT