Struct google_api_proto::google::cloud::retail::v2alpha::catalog_service_client::CatalogServiceClient
source · pub struct CatalogServiceClient<T> { /* private fields */ }
Expand description
Service for managing catalog configuration.
Implementations§
source§impl<T> CatalogServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> CatalogServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> CatalogServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub 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.v2alpha.Catalog]s associated with the project.
sourcepub 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.v2alpha.Catalog]s.
sourcepub 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.v2alpha.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2alpha.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2alpha.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.v2alpha.SearchRequest.branch] to
projects/*/locations/*/catalogs/*/branches/default_branch
is equivalent
to setting
[SearchRequest.branch][google.cloud.retail.v2alpha.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.v2alpha.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}.
sourcepub 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.v2alpha.CatalogService.SetDefaultBranch] method under a specified parent catalog.
sourcepub async fn get_completion_config(
&mut self,
request: impl IntoRequest<GetCompletionConfigRequest>,
) -> Result<Response<CompletionConfig>, Status>
pub async fn get_completion_config( &mut self, request: impl IntoRequest<GetCompletionConfigRequest>, ) -> Result<Response<CompletionConfig>, Status>
Gets a [CompletionConfig][google.cloud.retail.v2alpha.CompletionConfig].
sourcepub async fn update_completion_config(
&mut self,
request: impl IntoRequest<UpdateCompletionConfigRequest>,
) -> Result<Response<CompletionConfig>, Status>
pub async fn update_completion_config( &mut self, request: impl IntoRequest<UpdateCompletionConfigRequest>, ) -> Result<Response<CompletionConfig>, Status>
Updates the [CompletionConfig][google.cloud.retail.v2alpha.CompletionConfig]s.
sourcepub async fn get_attributes_config(
&mut self,
request: impl IntoRequest<GetAttributesConfigRequest>,
) -> Result<Response<AttributesConfig>, Status>
pub async fn get_attributes_config( &mut self, request: impl IntoRequest<GetAttributesConfigRequest>, ) -> Result<Response<AttributesConfig>, Status>
Gets an [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig].
sourcepub async fn update_attributes_config(
&mut self,
request: impl IntoRequest<UpdateAttributesConfigRequest>,
) -> Result<Response<AttributesConfig>, Status>
pub async fn update_attributes_config( &mut self, request: impl IntoRequest<UpdateAttributesConfigRequest>, ) -> Result<Response<AttributesConfig>, Status>
Updates the [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig].
The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.
sourcepub async fn add_catalog_attribute(
&mut self,
request: impl IntoRequest<AddCatalogAttributeRequest>,
) -> Result<Response<AttributesConfig>, Status>
pub async fn add_catalog_attribute( &mut self, request: impl IntoRequest<AddCatalogAttributeRequest>, ) -> Result<Response<AttributesConfig>, Status>
Adds the specified [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to the [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig].
If the [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to add already exists, an ALREADY_EXISTS error is returned.
sourcepub async fn remove_catalog_attribute(
&mut self,
request: impl IntoRequest<RemoveCatalogAttributeRequest>,
) -> Result<Response<AttributesConfig>, Status>
pub async fn remove_catalog_attribute( &mut self, request: impl IntoRequest<RemoveCatalogAttributeRequest>, ) -> Result<Response<AttributesConfig>, Status>
Removes the specified [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] from the [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig].
If the [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to remove does not exist, a NOT_FOUND error is returned.
sourcepub async fn batch_remove_catalog_attributes(
&mut self,
request: impl IntoRequest<BatchRemoveCatalogAttributesRequest>,
) -> Result<Response<BatchRemoveCatalogAttributesResponse>, Status>
pub async fn batch_remove_catalog_attributes( &mut self, request: impl IntoRequest<BatchRemoveCatalogAttributesRequest>, ) -> Result<Response<BatchRemoveCatalogAttributesResponse>, Status>
Removes all specified [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute]s from the [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig].
sourcepub async fn replace_catalog_attribute(
&mut self,
request: impl IntoRequest<ReplaceCatalogAttributeRequest>,
) -> Result<Response<AttributesConfig>, Status>
pub async fn replace_catalog_attribute( &mut self, request: impl IntoRequest<ReplaceCatalogAttributeRequest>, ) -> Result<Response<AttributesConfig>, Status>
Replaces the specified [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] in the [AttributesConfig][google.cloud.retail.v2alpha.AttributesConfig] by updating the catalog attribute with the same [CatalogAttribute.key][google.cloud.retail.v2alpha.CatalogAttribute.key].
If the [CatalogAttribute][google.cloud.retail.v2alpha.CatalogAttribute] to replace does not exist, a NOT_FOUND error is returned.
Trait Implementations§
source§impl<T: Clone> Clone for CatalogServiceClient<T>
impl<T: Clone> Clone for CatalogServiceClient<T>
source§fn clone(&self) -> CatalogServiceClient<T>
fn clone(&self) -> CatalogServiceClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for CatalogServiceClient<T>
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request