Service for ingesting Product information of the customer's website.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection>
objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
ProductServiceClient(ProductServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
ProductServiceClient const &
|
ProductServiceClient(ProductServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
ProductServiceClient &&
|
ProductServiceClient(std::shared_ptr< ProductServiceConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< ProductServiceConnection >
|
opts |
Options
|
Operators
operator=(ProductServiceClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
ProductServiceClient const &
|
Returns | |
---|---|
Type | Description |
ProductServiceClient & |
operator=(ProductServiceClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
ProductServiceClient &&
|
Returns | |
---|---|
Type | Description |
ProductServiceClient & |
Functions
CreateProduct(std::string const &, google::cloud::retail::v2::Product const &, std::string const &, Options)
Creates a Product.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent catalog resource name, such as |
product |
google::cloud::retail::v2::Product const &
Required. The Product to create. |
product_id |
std::string const &
Required. The ID to use for the Product, which will become the final component of the [Product.name][google.cloud.retail.v2.Product.name]. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::retail::v2::Product > |
the result of the RPC. The response message type (google.cloud.retail.v2.Product) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateProduct(google::cloud::retail::v2::CreateProductRequest const &, Options)
Creates a Product.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::retail::v2::CreateProductRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::retail::v2::Product > |
the result of the RPC. The response message type (google.cloud.retail.v2.Product) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetProduct(std::string const &, Options)
Gets a Product.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. Full resource name of Product, such as |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::retail::v2::Product > |
the result of the RPC. The response message type (google.cloud.retail.v2.Product) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetProduct(google::cloud::retail::v2::GetProductRequest const &, Options)
Gets a Product.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::retail::v2::GetProductRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::retail::v2::Product > |
the result of the RPC. The response message type (google.cloud.retail.v2.Product) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
ListProducts(std::string const &, Options)
Gets a list of Products.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent branch resource name, such as |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::retail::v2::Product > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListProducts(google::cloud::retail::v2::ListProductsRequest, Options)
Gets a list of Products.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::retail::v2::ListProductsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::retail::v2::Product > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
UpdateProduct(google::cloud::retail::v2::Product const &, google::protobuf::FieldMask const &, Options)
Updates a Product.
Parameters | |
---|---|
Name | Description |
product |
google::cloud::retail::v2::Product const &
Required. The product to update/create. |
update_mask |
google::protobuf::FieldMask const &
Indicates which fields in the provided Product to update. The immutable and output only fields are NOT supported. If not set, all supported fields (the fields that are neither immutable nor output only) are updated. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::retail::v2::Product > |
the result of the RPC. The response message type (google.cloud.retail.v2.Product) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
UpdateProduct(google::cloud::retail::v2::UpdateProductRequest const &, Options)
Updates a Product.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::retail::v2::UpdateProductRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::retail::v2::Product > |
the result of the RPC. The response message type (google.cloud.retail.v2.Product) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
DeleteProduct(std::string const &, Options)
Deletes a Product.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. Full resource name of Product, such as |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
DeleteProduct(google::cloud::retail::v2::DeleteProductRequest const &, Options)
Deletes a Product.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::retail::v2::DeleteProductRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
Status |
a |
ImportProducts(google::cloud::retail::v2::ImportProductsRequest const &, Options)
Bulk import of multiple Products.
Request processing may be synchronous. Non-existing items are created.
Note that it is possible for a subset of the Products to be successfully updated.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::retail::v2::ImportProductsRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::retail::v2::ImportProductsResponse > > |
A |
SetInventory(google::cloud::retail::v2::Product const &, google::protobuf::FieldMask const &, Options)
Updates inventory information for a Product while respecting the last update timestamps of each inventory field.
This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update is enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.
When inventory is updated with ProductService.CreateProduct and ProductService.UpdateProduct, the specified inventory field value(s) overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update times for the specified inventory fields are overwritten by the times of the ProductService.CreateProduct or ProductService.UpdateProduct request.
If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product is used.
If no inventory fields are set in SetInventoryRequest.set_mask, then any existing inventory information is preserved.
Pre-existing inventory information can only be updated with ProductService.SetInventory, ProductService.AddFulfillmentPlaces, and ProductService.RemoveFulfillmentPlaces.
The returned Operations is obsolete after one day, and the GetOperation API returns NOT_FOUND
afterwards.
If conflicting updates are issued, the Operations associated with the stale updates are not marked as done until they are obsolete.
Parameters | |
---|---|
Name | Description |
inventory |
google::cloud::retail::v2::Product const &
Required. The inventory information to update. |
set_mask |
google::protobuf::FieldMask const &
Indicates which inventory fields in the provided Product to update. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::retail::v2::SetInventoryResponse > > |
A |
SetInventory(google::cloud::retail::v2::SetInventoryRequest const &, Options)
Updates inventory information for a Product while respecting the last update timestamps of each inventory field.
This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update is enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.
When inventory is updated with ProductService.CreateProduct and ProductService.UpdateProduct, the specified inventory field value(s) overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update times for the specified inventory fields are overwritten by the times of the ProductService.CreateProduct or ProductService.UpdateProduct request.
If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product is used.
If no inventory fields are set in SetInventoryRequest.set_mask, then any existing inventory information is preserved.
Pre-existing inventory information can only be updated with ProductService.SetInventory, ProductService.AddFulfillmentPlaces, and ProductService.RemoveFulfillmentPlaces.
The returned Operations is obsolete after one day, and the GetOperation API returns NOT_FOUND
afterwards.
If conflicting updates are issued, the Operations associated with the stale updates are not marked as done until they are obsolete.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::retail::v2::SetInventoryRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::retail::v2::SetInventoryResponse > > |
A |
AddFulfillmentPlaces(std::string const &, Options)
It is recommended to use the ProductService.AddLocalInventories method instead of ProductService.AddFulfillmentPlaces.
ProductService.AddLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data.
Incrementally adds place IDs to Product.fulfillment_info.place_ids.
This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.
The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards.
If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.
Parameters | |
---|---|
Name | Description |
product |
std::string const &
Required. Full resource name of Product, such as |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::retail::v2::AddFulfillmentPlacesResponse > > |
A |
AddFulfillmentPlaces(google::cloud::retail::v2::AddFulfillmentPlacesRequest const &, Options)
It is recommended to use the ProductService.AddLocalInventories method instead of ProductService.AddFulfillmentPlaces.
ProductService.AddLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data.
Incrementally adds place IDs to Product.fulfillment_info.place_ids.
This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.
The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards.
If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::retail::v2::AddFulfillmentPlacesRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::retail::v2::AddFulfillmentPlacesResponse > > |
A |
RemoveFulfillmentPlaces(std::string const &, Options)
It is recommended to use the ProductService.RemoveLocalInventories method instead of ProductService.RemoveFulfillmentPlaces.
ProductService.RemoveLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data.
Incrementally removes place IDs from a Product.fulfillment_info.place_ids.
This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.
The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards.
If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.
Parameters | |
---|---|
Name | Description |
product |
std::string const &
Required. Full resource name of Product, such as |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::retail::v2::RemoveFulfillmentPlacesResponse > > |
A |
RemoveFulfillmentPlaces(google::cloud::retail::v2::RemoveFulfillmentPlacesRequest const &, Options)
It is recommended to use the ProductService.RemoveLocalInventories method instead of ProductService.RemoveFulfillmentPlaces.
ProductService.RemoveLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data.
Incrementally removes place IDs from a Product.fulfillment_info.place_ids.
This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.
The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards.
If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::retail::v2::RemoveFulfillmentPlacesRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::retail::v2::RemoveFulfillmentPlacesResponse > > |
A |
AddLocalInventories(std::string const &, Options)
Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field.
This process is asynchronous and does not require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.
Local inventory information can only be modified using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories.
The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards.
If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.
Parameters | |
---|---|
Name | Description |
product |
std::string const &
Required. Full resource name of Product, such as |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::retail::v2::AddLocalInventoriesResponse > > |
A |
AddLocalInventories(google::cloud::retail::v2::AddLocalInventoriesRequest const &, Options)
Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field.
This process is asynchronous and does not require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.
Local inventory information can only be modified using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories.
The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards.
If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::retail::v2::AddLocalInventoriesRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::retail::v2::AddLocalInventoriesResponse > > |
A |
RemoveLocalInventories(std::string const &, Options)
Remove local inventory information for a Product at a list of places at a removal timestamp.
This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.
Local inventory information can only be removed using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories.
The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards.
If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.
Parameters | |
---|---|
Name | Description |
product |
std::string const &
Required. Full resource name of Product, such as |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::retail::v2::RemoveLocalInventoriesResponse > > |
A |
RemoveLocalInventories(google::cloud::retail::v2::RemoveLocalInventoriesRequest const &, Options)
Remove local inventory information for a Product at a list of places at a removal timestamp.
This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts.
Local inventory information can only be removed using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories.
The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards.
If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::retail::v2::RemoveLocalInventoriesRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::retail::v2::RemoveLocalInventoriesResponse > > |
A |