# Class ProductInputsServiceClient (1.21.0)

1.21.0 (latest) 1.19.0 1.16.0 1.15.0 1.13.0 1.11.0 1.10.0 1.8.0 1.6.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.26.0 0.24.0 0.23.0 0.20.0 0.19.0 0.18.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

|---|---|
| [GitHub Repository](https://github.com/googleapis/google-cloud-java/tree/main/java-shopping-merchant-products/google-shopping-merchant-products/src/main/java/com/google/shopping/merchant/products/v1/ProductInputsServiceClient.java) | [Product Reference](https://developers.google.com/merchant/api) |

Service Description: Service to use ProductInput resource.

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:


     // 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 (ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create()) {
       InsertProductInputRequest request =
           InsertProductInputRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT]").toString())
               .setProductInput(ProductInput.newBuilder().build())
               .setDataSource("dataSource1272470629")
               .build();
       ProductInput response = productInputsServiceClient.insertProductInput(request);
     }
     
Note: close() needs to be called on the ProductInputsServiceClient object to clean up
resources such as threads. In the example above, try-with-resources is used, which automatically
calls close().

| Method | Description | Method Variants |
|---|---|---|
| InsertProductInput | [Uploads a product input to your Merchant Center account](https://docs.cloud.google.com/merchant/api/guides/products/add-manage#add_a_product). You must have a products [data source](https://docs.cloud.google.com/merchant/api/guides/data-sources/api-sources#create-primary-data-source) to be able to insert a product. The unique identifier of the data source is passed as a query parameter in the request URL. If a product input with the same contentLanguage, offerId, and dataSource already exists, then the product input inserted by this method replaces that entry. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - insertProductInput(InsertProductInputRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - insertProductInputCallable() |
| UpdateProductInput | Updates the existing product input in your Merchant Center account. The name of the product input to update is taken from the `name` field within the `ProductInput` resource. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateProductInput(UpdateProductInputRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - updateProductInput(ProductInput productInput, FieldMask updateMask) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - updateProductInputCallable() |
| DeleteProductInput | Deletes a product input from your Merchant Center account. After inserting, updating, or deleting a product input, it may take several minutes before the processed product can be retrieved. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteProductInput(DeleteProductInputRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - deleteProductInput(ProductInputName name) - deleteProductInput(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. - deleteProductInputCallable() |
[Methods]

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 ProductInputsServiceSettings
to create(). For example:

To customize credentials:


     // 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
     ProductInputsServiceSettings productInputsServiceSettings =
         ProductInputsServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create(productInputsServiceSettings);
     
To customize the endpoint:


     // 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
     ProductInputsServiceSettings productInputsServiceSettings =
         ProductInputsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create(productInputsServiceSettings);
     
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
the wire:


     // 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
     ProductInputsServiceSettings productInputsServiceSettings =
         ProductInputsServiceSettings.newHttpJsonBuilder().build();
     ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create(productInputsServiceSettings);
     
Please refer to the GitHub repository's samples for more quickstart code snippets.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> ProductInputsServiceClient

## Static Methods

### create()

    public static final ProductInputsServiceClient create()

Constructs an instance of ProductInputsServiceClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInputsServiceClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(ProductInputsServiceSettings settings)

    public static final ProductInputsServiceClient create(ProductInputsServiceSettings settings)

Constructs an instance of ProductInputsServiceClient, using the given settings. The channels
are created based on the settings passed in, or defaults for any settings that are not set.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInputsServiceSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInputsServiceClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(ProductInputsServiceStub stub)

    public static final ProductInputsServiceClient create(ProductInputsServiceStub stub)

Constructs an instance of ProductInputsServiceClient, using the given stub for making calls.
This is for advanced usage - prefer using create(ProductInputsServiceSettings).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.stub.ProductInputsServiceStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInputsServiceClient` |   |

## Constructors

### ProductInputsServiceClient(ProductInputsServiceSettings settings)

    protected ProductInputsServiceClient(ProductInputsServiceSettings settings)

Constructs an instance of ProductInputsServiceClient, 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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInputsServiceSettings` |

### ProductInputsServiceClient(ProductInputsServiceStub stub)

    protected ProductInputsServiceClient(ProductInputsServiceStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.stub.ProductInputsServiceStub` |

## Methods

### awaitTermination(long duration, TimeUnit unit)

    public boolean awaitTermination(long duration, TimeUnit unit)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `duration` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `unit` | `https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html` |   |

### close()

    public final void close()

### deleteProductInput(DeleteProductInputRequest request)

    public final void deleteProductInput(DeleteProductInputRequest request)

Deletes a product input from your Merchant Center account.

After inserting, updating, or deleting a product input, it may take several minutes before
the processed product can be retrieved.

Sample 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 (ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create()) {
       DeleteProductInputRequest request =
           DeleteProductInputRequest.newBuilder()
               .setName(ProductInputName.of("[ACCOUNT]", "[PRODUCTINPUT]").toString())
               .setDataSource("dataSource1272470629")
               .build();
       productInputsServiceClient.deleteProductInput(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.DeleteProductInputRequest` The request object containing all of the parameters for the API call. |

### deleteProductInput(ProductInputName name)

    public final void deleteProductInput(ProductInputName name)

Deletes a product input from your Merchant Center account.

After inserting, updating, or deleting a product input, it may take several minutes before
the processed product can be retrieved.

Sample 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 (ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create()) {
       ProductInputName name = ProductInputName.of("[ACCOUNT]", "[PRODUCTINPUT]");
       productInputsServiceClient.deleteProductInput(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInputName` Required. The name of the product input to delete. Format: `accounts/{account}/productInputs/{productInput}` The {productInput} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {productInput} segment in the URL is automatically detected by the server, supporting two options: 1. \*\*Encoded Format\*\*: The `{productInput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. \* Example: To represent the product ID `en~US~sku/123`, the `{productInput}` segment must be the unpadded base64url encoding of this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name for the product would be `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`. 2. \*\*Plain Format\*\*: The `{productInput}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the \*\*Encoded Format\*\* for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{productInput}` segment is used to differentiate between the two formats. |

### deleteProductInput(String name)

    public final void deleteProductInput(String name)

Deletes a product input from your Merchant Center account.

After inserting, updating, or deleting a product input, it may take several minutes before
the processed product can be retrieved.

Sample 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 (ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create()) {
       String name = ProductInputName.of("[ACCOUNT]", "[PRODUCTINPUT]").toString();
       productInputsServiceClient.deleteProductInput(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The name of the product input to delete. Format: `accounts/{account}/productInputs/{productInput}` The {productInput} segment is a unique identifier for the product. This identifier must be unique within a merchant account and generally follows the structure: `content_language~feed_label~offer_id`. Example: `en~US~sku123` For legacy local products, the structure is: `local~content_language~feed_label~offer_id`. Example: `local~en~US~sku123` The format of the {productInput} segment in the URL is automatically detected by the server, supporting two options: 1. \*\*Encoded Format\*\*: The `{productInput}` segment is an unpadded base64url encoded string (RFC 4648 Section 5). The decoded string must result in the `content_language~feed_label~offer_id` structure. This encoding MUST be used if any part of the product identifier (like `offer_id`) contains characters such as `/`, `%`, or `~`. \* Example: To represent the product ID `en~US~sku/123`, the `{productInput}` segment must be the unpadded base64url encoding of this string, which is `ZW5-VVN-c2t1LzEyMw`. The full resource name for the product would be `accounts/123/productInputs/ZW5-VVN-c2t1LzEyMw`. 2. \*\*Plain Format\*\*: The `{productInput}` segment is the tilde-separated string `content_language~feed_label~offer_id`. This format is suitable only when `content_language`, `feed_label`, and `offer_id` do not contain URL-problematic characters like `/`, `%`, or `~`. We recommend using the \*\*Encoded Format\*\* for all product IDs to ensure correct parsing, especially those containing special characters. The presence of tilde (`~`) characters in the `{productInput}` segment is used to differentiate between the two formats. |

### deleteProductInputCallable()

    public final UnaryCallable<DeleteProductInputRequest,Empty> deleteProductInputCallable()

Deletes a product input from your Merchant Center account.

After inserting, updating, or deleting a product input, it may take several minutes before
the processed product can be retrieved.

Sample 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 (ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create()) {
       DeleteProductInputRequest request =
           DeleteProductInputRequest.newBuilder()
               .setName(ProductInputName.of("[ACCOUNT]", "[PRODUCTINPUT]").toString())
               .setDataSource("dataSource1272470629")
               .build();
       ApiFuture<Empty> future =
           productInputsServiceClient.deleteProductInputCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.DeleteProductInputRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### getSettings()

    public final ProductInputsServiceSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInputsServiceSettings` |   |

### getStub()

    public ProductInputsServiceStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.stub.ProductInputsServiceStub` |   |

### insertProductInput(InsertProductInputRequest request)

    public final ProductInput insertProductInput(InsertProductInputRequest request)

[Uploads a product input to your Merchant Center
account](https://docs.cloud.google.com/merchant/api/guides/products/add-manage#add_a_product). You must have a products
[data source](https://docs.cloud.google.com/merchant/api/guides/data-sources/api-sources#create-primary-data-source) to be
able to insert a product. The unique identifier of the data source is passed as a query
parameter in the request URL.

If a product input with the same contentLanguage, offerId, and dataSource already exists,
then the product input inserted by this method replaces that entry.

After inserting, updating, or deleting a product input, it may take several minutes before
the processed product can be retrieved.

Sample 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 (ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create()) {
       InsertProductInputRequest request =
           InsertProductInputRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT]").toString())
               .setProductInput(ProductInput.newBuilder().build())
               .setDataSource("dataSource1272470629")
               .build();
       ProductInput response = productInputsServiceClient.insertProductInput(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.InsertProductInputRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput` |   |

### insertProductInputCallable()

    public final UnaryCallable<InsertProductInputRequest,ProductInput> insertProductInputCallable()

[Uploads a product input to your Merchant Center
account](https://docs.cloud.google.com/merchant/api/guides/products/add-manage#add_a_product). You must have a products
[data source](https://docs.cloud.google.com/merchant/api/guides/data-sources/api-sources#create-primary-data-source) to be
able to insert a product. The unique identifier of the data source is passed as a query
parameter in the request URL.

If a product input with the same contentLanguage, offerId, and dataSource already exists,
then the product input inserted by this method replaces that entry.

After inserting, updating, or deleting a product input, it may take several minutes before
the processed product can be retrieved.

Sample 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 (ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create()) {
       InsertProductInputRequest request =
           InsertProductInputRequest.newBuilder()
               .setParent(AccountName.of("[ACCOUNT]").toString())
               .setProductInput(ProductInput.newBuilder().build())
               .setDataSource("dataSource1272470629")
               .build();
       ApiFuture<ProductInput> future =
           productInputsServiceClient.insertProductInputCallable().futureCall(request);
       // Do something.
       ProductInput response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.InsertProductInputRequest,https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput>` |   |

### isShutdown()

    public boolean isShutdown()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### isTerminated()

    public boolean isTerminated()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()

### updateProductInput(ProductInput productInput, FieldMask updateMask)

    public final ProductInput updateProductInput(ProductInput productInput, FieldMask updateMask)

Updates the existing product input in your Merchant Center account. The name of the product
input to update is taken from the `name` field within the `ProductInput` resource.

After inserting, updating, or deleting a product input, it may take several minutes before
the processed product can be retrieved.

Sample 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 (ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create()) {
       ProductInput productInput = ProductInput.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       ProductInput response =
           productInputsServiceClient.updateProductInput(productInput, updateMask);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `productInput` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput` Required. The product input resource to update. Information you submit will be applied to the processed product as well. The `name` field within this resource identifies the product input to be updated. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Optional. The list of product attributes to be updated. If the update mask is omitted, then it is treated as implied field mask equivalent to all fields that are populated (have a non-empty value). Attributes specified in the update mask without a value specified in the body will be deleted from the product. Update mask can only be specified for top level fields in attributes and custom attributes. To specify the update mask for custom attributes you need to add the `custom_attribute.` prefix. Providing special "\*" value for full product replacement is not supported. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput` |   |

### updateProductInput(UpdateProductInputRequest request)

    public final ProductInput updateProductInput(UpdateProductInputRequest request)

Updates the existing product input in your Merchant Center account. The name of the product
input to update is taken from the `name` field within the `ProductInput` resource.

After inserting, updating, or deleting a product input, it may take several minutes before
the processed product can be retrieved.

Sample 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 (ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create()) {
       UpdateProductInputRequest request =
           UpdateProductInputRequest.newBuilder()
               .setProductInput(ProductInput.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .setDataSource("dataSource1272470629")
               .build();
       ProductInput response = productInputsServiceClient.updateProductInput(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.UpdateProductInputRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput` |   |

### updateProductInputCallable()

    public final UnaryCallable<UpdateProductInputRequest,ProductInput> updateProductInputCallable()

Updates the existing product input in your Merchant Center account. The name of the product
input to update is taken from the `name` field within the `ProductInput` resource.

After inserting, updating, or deleting a product input, it may take several minutes before
the processed product can be retrieved.

Sample 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 (ProductInputsServiceClient productInputsServiceClient =
         ProductInputsServiceClient.create()) {
       UpdateProductInputRequest request =
           UpdateProductInputRequest.newBuilder()
               .setProductInput(ProductInput.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .setDataSource("dataSource1272470629")
               .build();
       ApiFuture<ProductInput> future =
           productInputsServiceClient.updateProductInputCallable().futureCall(request);
       // Do something.
       ProductInput response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.UpdateProductInputRequest,https://docs.cloud.google.com/java/docs/reference/google-shopping-merchant-products/latest/com.google.shopping.merchant.products.v1.ProductInput>` |   |