Package com.google.shopping.merchant.inventories.v1beta (0.3.0)

A client to Merchant API

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

LocalInventoryServiceClient

Service Description: Service to manage local inventory for products

Sample for LocalInventoryServiceClient:


 // 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 (LocalInventoryServiceClient localInventoryServiceClient =
     LocalInventoryServiceClient.create()) {
   InsertLocalInventoryRequest request =
       InsertLocalInventoryRequest.newBuilder()
           .setParent("parent-995424086")
           .setLocalInventory(LocalInventory.newBuilder().build())
           .build();
   LocalInventory response = localInventoryServiceClient.insertLocalInventory(request);
 }
 

RegionalInventoryServiceClient

Service Description: Service to manage regional inventory for products. There is also separate regions resource and API to manage regions definitions.

Sample for RegionalInventoryServiceClient:


 // 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 (RegionalInventoryServiceClient regionalInventoryServiceClient =
     RegionalInventoryServiceClient.create()) {
   InsertRegionalInventoryRequest request =
       InsertRegionalInventoryRequest.newBuilder()
           .setParent("parent-995424086")
           .setRegionalInventory(RegionalInventory.newBuilder().build())
           .build();
   RegionalInventory response = regionalInventoryServiceClient.insertRegionalInventory(request);
 }
 

Classes

DeleteLocalInventoryRequest

Request message for the DeleteLocalInventory method.

Protobuf type google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest

DeleteLocalInventoryRequest.Builder

Request message for the DeleteLocalInventory method.

Protobuf type google.shopping.merchant.inventories.v1beta.DeleteLocalInventoryRequest

DeleteRegionalInventoryRequest

Request message for the DeleteRegionalInventory method.

Protobuf type google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest

DeleteRegionalInventoryRequest.Builder

Request message for the DeleteRegionalInventory method.

Protobuf type google.shopping.merchant.inventories.v1beta.DeleteRegionalInventoryRequest

InsertLocalInventoryRequest

Request message for the InsertLocalInventory method.

Protobuf type google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest

InsertLocalInventoryRequest.Builder

Request message for the InsertLocalInventory method.

Protobuf type google.shopping.merchant.inventories.v1beta.InsertLocalInventoryRequest

InsertRegionalInventoryRequest

Request message for the InsertRegionalInventory method.

Protobuf type google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest

InsertRegionalInventoryRequest.Builder

Request message for the InsertRegionalInventory method.

Protobuf type google.shopping.merchant.inventories.v1beta.InsertRegionalInventoryRequest

ListLocalInventoriesRequest

Request message for the ListLocalInventories method.

Protobuf type google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest

ListLocalInventoriesRequest.Builder

Request message for the ListLocalInventories method.

Protobuf type google.shopping.merchant.inventories.v1beta.ListLocalInventoriesRequest

ListLocalInventoriesResponse

Response message for the ListLocalInventories method.

Protobuf type google.shopping.merchant.inventories.v1beta.ListLocalInventoriesResponse

ListLocalInventoriesResponse.Builder

Response message for the ListLocalInventories method.

Protobuf type google.shopping.merchant.inventories.v1beta.ListLocalInventoriesResponse

ListRegionalInventoriesRequest

Request message for the ListRegionalInventories method.

Protobuf type google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest

ListRegionalInventoriesRequest.Builder

Request message for the ListRegionalInventories method.

Protobuf type google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesRequest

ListRegionalInventoriesResponse

Response message for the ListRegionalInventories method.

Protobuf type google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesResponse

ListRegionalInventoriesResponse.Builder

Response message for the ListRegionalInventories method.

Protobuf type google.shopping.merchant.inventories.v1beta.ListRegionalInventoriesResponse

LocalInventory

Local inventory information for the product. Represents in-store information for a specific product at the store specified by storeCode. For a list of all accepted attribute values, see the local product inventory feed specification.

Protobuf type google.shopping.merchant.inventories.v1beta.LocalInventory

LocalInventory.Builder

Local inventory information for the product. Represents in-store information for a specific product at the store specified by storeCode. For a list of all accepted attribute values, see the local product inventory feed specification.

Protobuf type google.shopping.merchant.inventories.v1beta.LocalInventory

LocalInventoryName

LocalInventoryName.Builder

Builder for accounts/{account}/products/{product}/localInventories/{store_code}.

LocalInventoryProto

LocalInventoryServiceClient

Service Description: Service to manage local inventory for products

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 (LocalInventoryServiceClient localInventoryServiceClient =
     LocalInventoryServiceClient.create()) {
   InsertLocalInventoryRequest request =
       InsertLocalInventoryRequest.newBuilder()
           .setParent("parent-995424086")
           .setLocalInventory(LocalInventory.newBuilder().build())
           .build();
   LocalInventory response = localInventoryServiceClient.insertLocalInventory(request);
 }
 

Note: close() needs to be called on the LocalInventoryServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of LocalInventoryServiceSettings 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
 LocalInventoryServiceSettings localInventoryServiceSettings =
     LocalInventoryServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 LocalInventoryServiceClient localInventoryServiceClient =
     LocalInventoryServiceClient.create(localInventoryServiceSettings);
 

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
 LocalInventoryServiceSettings localInventoryServiceSettings =
     LocalInventoryServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 LocalInventoryServiceClient localInventoryServiceClient =
     LocalInventoryServiceClient.create(localInventoryServiceSettings);
 

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
 LocalInventoryServiceSettings localInventoryServiceSettings =
     LocalInventoryServiceSettings.newHttpJsonBuilder().build();
 LocalInventoryServiceClient localInventoryServiceClient =
     LocalInventoryServiceClient.create(localInventoryServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

LocalInventoryServiceClient.ListLocalInventoriesFixedSizeCollection

LocalInventoryServiceClient.ListLocalInventoriesPage

LocalInventoryServiceClient.ListLocalInventoriesPagedResponse

LocalInventoryServiceGrpc

Service to manage local inventory for products

LocalInventoryServiceGrpc.LocalInventoryServiceBlockingStub

A stub to allow clients to do synchronous rpc calls to service LocalInventoryService.

Service to manage local inventory for products

LocalInventoryServiceGrpc.LocalInventoryServiceFutureStub

A stub to allow clients to do ListenableFuture-style rpc calls to service LocalInventoryService.

Service to manage local inventory for products

LocalInventoryServiceGrpc.LocalInventoryServiceImplBase

Base class for the server implementation of the service LocalInventoryService.

Service to manage local inventory for products

LocalInventoryServiceGrpc.LocalInventoryServiceStub

A stub to allow clients to do asynchronous rpc calls to service LocalInventoryService.

Service to manage local inventory for products

LocalInventoryServiceSettings

Settings class to configure an instance of LocalInventoryServiceClient.

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 total timeout of insertLocalInventory to 30 seconds:


 // 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
 LocalInventoryServiceSettings.Builder localInventoryServiceSettingsBuilder =
     LocalInventoryServiceSettings.newBuilder();
 localInventoryServiceSettingsBuilder
     .insertLocalInventorySettings()
     .setRetrySettings(
         localInventoryServiceSettingsBuilder
             .insertLocalInventorySettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 LocalInventoryServiceSettings localInventoryServiceSettings =
     localInventoryServiceSettingsBuilder.build();
 

LocalInventoryServiceSettings.Builder

Builder for LocalInventoryServiceSettings.

RegionalInventory

Regional inventory information for the product. Represents specific information like price and availability for a given product in a specific region. For a list of all accepted attribute values, see the regional product inventory feed specification.

Protobuf type google.shopping.merchant.inventories.v1beta.RegionalInventory

RegionalInventory.Builder

Regional inventory information for the product. Represents specific information like price and availability for a given product in a specific region. For a list of all accepted attribute values, see the regional product inventory feed specification.

Protobuf type google.shopping.merchant.inventories.v1beta.RegionalInventory

RegionalInventoryName

RegionalInventoryName.Builder

Builder for accounts/{account}/products/{product}/regionalInventories/{region}.

RegionalInventoryProto

RegionalInventoryServiceClient

Service Description: Service to manage regional inventory for products. There is also separate regions resource and API to manage regions definitions.

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 (RegionalInventoryServiceClient regionalInventoryServiceClient =
     RegionalInventoryServiceClient.create()) {
   InsertRegionalInventoryRequest request =
       InsertRegionalInventoryRequest.newBuilder()
           .setParent("parent-995424086")
           .setRegionalInventory(RegionalInventory.newBuilder().build())
           .build();
   RegionalInventory response = regionalInventoryServiceClient.insertRegionalInventory(request);
 }
 

Note: close() needs to be called on the RegionalInventoryServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of RegionalInventoryServiceSettings 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
 RegionalInventoryServiceSettings regionalInventoryServiceSettings =
     RegionalInventoryServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 RegionalInventoryServiceClient regionalInventoryServiceClient =
     RegionalInventoryServiceClient.create(regionalInventoryServiceSettings);
 

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
 RegionalInventoryServiceSettings regionalInventoryServiceSettings =
     RegionalInventoryServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 RegionalInventoryServiceClient regionalInventoryServiceClient =
     RegionalInventoryServiceClient.create(regionalInventoryServiceSettings);
 

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
 RegionalInventoryServiceSettings regionalInventoryServiceSettings =
     RegionalInventoryServiceSettings.newHttpJsonBuilder().build();
 RegionalInventoryServiceClient regionalInventoryServiceClient =
     RegionalInventoryServiceClient.create(regionalInventoryServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

RegionalInventoryServiceClient.ListRegionalInventoriesFixedSizeCollection

RegionalInventoryServiceClient.ListRegionalInventoriesPage

RegionalInventoryServiceClient.ListRegionalInventoriesPagedResponse

RegionalInventoryServiceGrpc

Service to manage regional inventory for products. There is also separate regions resource and API to manage regions definitions.

RegionalInventoryServiceGrpc.RegionalInventoryServiceBlockingStub

A stub to allow clients to do synchronous rpc calls to service RegionalInventoryService.

Service to manage regional inventory for products. There is also separate regions resource and API to manage regions definitions.

RegionalInventoryServiceGrpc.RegionalInventoryServiceFutureStub

A stub to allow clients to do ListenableFuture-style rpc calls to service RegionalInventoryService.

Service to manage regional inventory for products. There is also separate regions resource and API to manage regions definitions.

RegionalInventoryServiceGrpc.RegionalInventoryServiceImplBase

Base class for the server implementation of the service RegionalInventoryService.

Service to manage regional inventory for products. There is also separate regions resource and API to manage regions definitions.

RegionalInventoryServiceGrpc.RegionalInventoryServiceStub

A stub to allow clients to do asynchronous rpc calls to service RegionalInventoryService.

Service to manage regional inventory for products. There is also separate regions resource and API to manage regions definitions.

RegionalInventoryServiceSettings

Settings class to configure an instance of RegionalInventoryServiceClient.

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 total timeout of insertRegionalInventory to 30 seconds:


 // 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
 RegionalInventoryServiceSettings.Builder regionalInventoryServiceSettingsBuilder =
     RegionalInventoryServiceSettings.newBuilder();
 regionalInventoryServiceSettingsBuilder
     .insertRegionalInventorySettings()
     .setRetrySettings(
         regionalInventoryServiceSettingsBuilder
             .insertRegionalInventorySettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 RegionalInventoryServiceSettings regionalInventoryServiceSettings =
     regionalInventoryServiceSettingsBuilder.build();
 

RegionalInventoryServiceSettings.Builder

Builder for RegionalInventoryServiceSettings.

Interfaces

DeleteLocalInventoryRequestOrBuilder

DeleteRegionalInventoryRequestOrBuilder

InsertLocalInventoryRequestOrBuilder

InsertRegionalInventoryRequestOrBuilder

ListLocalInventoriesRequestOrBuilder

ListLocalInventoriesResponseOrBuilder

ListRegionalInventoriesRequestOrBuilder

ListRegionalInventoriesResponseOrBuilder

LocalInventoryOrBuilder

LocalInventoryServiceGrpc.AsyncService

Service to manage local inventory for products

RegionalInventoryOrBuilder

RegionalInventoryServiceGrpc.AsyncService

Service to manage regional inventory for products. There is also separate regions resource and API to manage regions definitions.