Struct googapis::google::cloud::retail::v2beta::catalog_service_client::CatalogServiceClient [−][src]
pub struct CatalogServiceClient<T> { /* fields omitted */ }
Expand description
Service for managing catalog configuration.
Implementations
impl<T> CatalogServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> CatalogServiceClient<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
) -> CatalogServiceClient<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 list_catalogs(
&mut self,
request: impl IntoRequest<ListCatalogsRequest>
) -> Result<Response<ListCatalogsResponse>, Status>
pub async fn list_catalogs(
&mut self,
request: impl IntoRequest<ListCatalogsRequest>
) -> Result<Response<ListCatalogsResponse>, Status>
Lists all the [Catalog][google.cloud.retail.v2beta.Catalog]s associated with the project.
pub async fn update_catalog(
&mut self,
request: impl IntoRequest<UpdateCatalogRequest>
) -> Result<Response<Catalog>, Status>
pub async fn update_catalog(
&mut self,
request: impl IntoRequest<UpdateCatalogRequest>
) -> Result<Response<Catalog>, Status>
Updates the [Catalog][google.cloud.retail.v2beta.Catalog]s.
pub async fn set_default_branch(
&mut self,
request: impl IntoRequest<SetDefaultBranchRequest>
) -> Result<Response<()>, Status>
pub async fn set_default_branch(
&mut self,
request: impl IntoRequest<SetDefaultBranchRequest>
) -> Result<Response<()>, Status>
Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2beta.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts] will treat requests using “default_branch” to the actual branch id set as default.
For example, if projects/*/locations/*/catalogs/*/branches/1
is set as
default, setting
[SearchRequest.branch][google.cloud.retail.v2beta.SearchRequest.branch] to
projects/*/locations/*/catalogs/*/branches/default_branch
is equivalent
to setting
[SearchRequest.branch][google.cloud.retail.v2beta.SearchRequest.branch] to
projects/*/locations/*/catalogs/*/branches/1
.
Using multiple branches can be useful when developers would like
to have a staging branch to test and verify for future usage. When it
becomes ready, developers switch on the staging branch using this API while
keeping using projects/*/locations/*/catalogs/*/branches/default_branch
as [SearchRequest.branch][google.cloud.retail.v2beta.SearchRequest.branch]
to route the traffic to this staging branch.
CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one.
More specifically:
- PredictionService will only return product IDs from branch {newBranch}.
- SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set).
- UserEventService will only join events with products from branch {newBranch}.
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 get_default_branch(
&mut self,
request: impl IntoRequest<GetDefaultBranchRequest>
) -> Result<Response<GetDefaultBranchResponse>, Status>
pub async fn get_default_branch(
&mut self,
request: impl IntoRequest<GetDefaultBranchRequest>
) -> Result<Response<GetDefaultBranchResponse>, Status>
Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2beta.CatalogService.SetDefaultBranch] method under a specified parent catalog.
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 CatalogServiceClient<T> where
T: RefUnwindSafe,
impl<T> Send for CatalogServiceClient<T> where
T: Send,
impl<T> Sync for CatalogServiceClient<T> where
T: Sync,
impl<T> Unpin for CatalogServiceClient<T> where
T: Unpin,
impl<T> UnwindSafe for CatalogServiceClient<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