Struct googapis::google::cloud::retail::v2alpha::product_service_client::ProductServiceClient [−][src]
pub struct ProductServiceClient<T> { /* fields omitted */ }
Expand description
Service for ingesting [Product][google.cloud.retail.v2alpha.Product] information of the customer’s website.
Implementations
impl<T> ProductServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> ProductServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> ProductServiceClient<InterceptedService<T, F>> where
F: Interceptor,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Compress requests with gzip
.
This requires the server to support it otherwise it might respond with an error.
Enable decompressing responses with gzip
.
pub async fn create_product(
&mut self,
request: impl IntoRequest<CreateProductRequest>
) -> Result<Response<Product>, Status>
pub async fn create_product(
&mut self,
request: impl IntoRequest<CreateProductRequest>
) -> Result<Response<Product>, Status>
Creates a [Product][google.cloud.retail.v2alpha.Product].
pub async fn get_product(
&mut self,
request: impl IntoRequest<GetProductRequest>
) -> Result<Response<Product>, Status>
pub async fn get_product(
&mut self,
request: impl IntoRequest<GetProductRequest>
) -> Result<Response<Product>, Status>
Gets a [Product][google.cloud.retail.v2alpha.Product].
pub async fn list_products(
&mut self,
request: impl IntoRequest<ListProductsRequest>
) -> Result<Response<ListProductsResponse>, Status>
pub async fn list_products(
&mut self,
request: impl IntoRequest<ListProductsRequest>
) -> Result<Response<ListProductsResponse>, Status>
Gets a list of [Product][google.cloud.retail.v2alpha.Product]s.
pub async fn update_product(
&mut self,
request: impl IntoRequest<UpdateProductRequest>
) -> Result<Response<Product>, Status>
pub async fn update_product(
&mut self,
request: impl IntoRequest<UpdateProductRequest>
) -> Result<Response<Product>, Status>
Updates a [Product][google.cloud.retail.v2alpha.Product].
pub async fn delete_product(
&mut self,
request: impl IntoRequest<DeleteProductRequest>
) -> Result<Response<()>, Status>
pub async fn delete_product(
&mut self,
request: impl IntoRequest<DeleteProductRequest>
) -> Result<Response<()>, Status>
Deletes a [Product][google.cloud.retail.v2alpha.Product].
pub async fn import_products(
&mut self,
request: impl IntoRequest<ImportProductsRequest>
) -> Result<Response<Operation>, Status>
pub async fn import_products(
&mut self,
request: impl IntoRequest<ImportProductsRequest>
) -> Result<Response<Operation>, Status>
Bulk import of multiple [Product][google.cloud.retail.v2alpha.Product]s.
Request processing may be synchronous. No partial updating is supported. Non-existing items are created.
Note that it is possible for a subset of the [Product][google.cloud.retail.v2alpha.Product]s to be successfully updated.
pub async fn set_inventory(
&mut self,
request: impl IntoRequest<SetInventoryRequest>
) -> Result<Response<Operation>, Status>
pub async fn set_inventory(
&mut self,
request: impl IntoRequest<SetInventoryRequest>
) -> Result<Response<Operation>, Status>
Updates inventory information for a [Product][google.cloud.retail.v2alpha.Product] while respecting the last update timestamps of each inventory field.
This process is asynchronous and does not require the [Product][google.cloud.retail.v2alpha.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, updates are not immediately manifested in the [Product][google.cloud.retail.v2alpha.Product] queried by [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
When inventory is updated with [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct], the specified inventory field value(s) will overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update time for the specified inventory fields will be overwritten to the time of the [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] or [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] request.
If no inventory fields are set in [CreateProductRequest.product][google.cloud.retail.v2alpha.CreateProductRequest.product], then any pre-existing inventory information for this product will be used.
If no inventory fields are set in [UpdateProductRequest.set_mask][], then any existing inventory information will be preserved.
Pre-existing inventory information can only be updated with [SetInventory][google.cloud.retail.v2alpha.ProductService.SetInventory], [AddFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.AddFulfillmentPlaces], and [RemoveFulfillmentPlaces][google.cloud.retail.v2alpha.ProductService.RemoveFulfillmentPlaces].
This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.
pub async fn add_fulfillment_places(
&mut self,
request: impl IntoRequest<AddFulfillmentPlacesRequest>
) -> Result<Response<Operation>, Status>
pub async fn add_fulfillment_places(
&mut self,
request: impl IntoRequest<AddFulfillmentPlacesRequest>
) -> Result<Response<Operation>, Status>
Incrementally adds place IDs to [Product.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids].
This process is asynchronous and does not require the [Product][google.cloud.retail.v2alpha.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][google.cloud.retail.v2alpha.Product] queried by [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.
pub async fn remove_fulfillment_places(
&mut self,
request: impl IntoRequest<RemoveFulfillmentPlacesRequest>
) -> Result<Response<Operation>, Status>
pub async fn remove_fulfillment_places(
&mut self,
request: impl IntoRequest<RemoveFulfillmentPlacesRequest>
) -> Result<Response<Operation>, Status>
Incrementally removes place IDs from a [Product.fulfillment_info.place_ids][google.cloud.retail.v2alpha.FulfillmentInfo.place_ids].
This process is asynchronous and does not require the [Product][google.cloud.retail.v2alpha.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][google.cloud.retail.v2alpha.Product] queried by [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.
pub async fn add_local_inventories(
&mut self,
request: impl IntoRequest<AddLocalInventoriesRequest>
) -> Result<Response<Operation>, Status>
pub async fn add_local_inventories(
&mut self,
request: impl IntoRequest<AddLocalInventoriesRequest>
) -> Result<Response<Operation>, Status>
Updates local inventory information for a [Product][google.cloud.retail.v2alpha.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][google.cloud.retail.v2alpha.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][google.cloud.retail.v2alpha.Product] queried by [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
Store inventory information can only be modified using this method. [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on local inventories.
This feature is only available for users who have Retail Search enabled. Please submit a form here to contact Cloud sales if you are interested in using Retail Search.
pub async fn remove_local_inventories(
&mut self,
request: impl IntoRequest<RemoveLocalInventoriesRequest>
) -> Result<Response<Operation>, Status>
pub async fn remove_local_inventories(
&mut self,
request: impl IntoRequest<RemoveLocalInventoriesRequest>
) -> Result<Response<Operation>, Status>
Remove local inventory information for a [Product][google.cloud.retail.v2alpha.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][google.cloud.retail.v2alpha.Product] queried by [GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct] or [ListProducts][google.cloud.retail.v2alpha.ProductService.ListProducts].
Store inventory information can only be removed using this method. [CreateProduct][google.cloud.retail.v2alpha.ProductService.CreateProduct] and [UpdateProduct][google.cloud.retail.v2alpha.ProductService.UpdateProduct] has no effect on local inventories.
This feature is only available for users who have Retail Search enabled. Please submit a form here to contact Cloud sales if you are interested in using Retail Search.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for ProductServiceClient<T> where
T: RefUnwindSafe,
impl<T> Send for ProductServiceClient<T> where
T: Send,
impl<T> Sync for ProductServiceClient<T> where
T: Sync,
impl<T> Unpin for ProductServiceClient<T> where
T: Unpin,
impl<T> UnwindSafe for ProductServiceClient<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more