public sealed class CatalogServiceClientImpl : CatalogServiceClient
Reference documentation and code samples for the Retail v2 API class CatalogServiceClientImpl.
CatalogService client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Retail.V2Assembly
Google.Cloud.Retail.V2.dll
Remarks
Service for managing catalog configuration.
Constructors
CatalogServiceClientImpl(CatalogServiceClient, CatalogServiceSettings, ILogger)
public CatalogServiceClientImpl(CatalogService.CatalogServiceClient grpcClient, CatalogServiceSettings settings, ILogger logger)
Constructs a client wrapper for the CatalogService service, with the specified gRPC client and settings.
Parameters | |
---|---|
Name | Description |
grpcClient | CatalogServiceCatalogServiceClient The underlying gRPC client. |
settings | CatalogServiceSettings The base CatalogServiceSettings used within this client. |
logger | ILogger Optional ILogger to use within this client. |
Properties
GrpcClient
public override CatalogService.CatalogServiceClient GrpcClient { get; }
The underlying gRPC CatalogService client
Property Value | |
---|---|
Type | Description |
CatalogServiceCatalogServiceClient |
LocationsClient
public override LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
Methods
AddCatalogAttribute(AddCatalogAttributeRequest, CallSettings)
public override AttributesConfig AddCatalogAttribute(AddCatalogAttributeRequest request, CallSettings callSettings = null)
Adds the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].
If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to add already exists, an ALREADY_EXISTS error is returned.
Parameters | |
---|---|
Name | Description |
request | AddCatalogAttributeRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AttributesConfig | The RPC response. |
AddCatalogAttributeAsync(AddCatalogAttributeRequest, CallSettings)
public override Task<AttributesConfig> AddCatalogAttributeAsync(AddCatalogAttributeRequest request, CallSettings callSettings = null)
Adds the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].
If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to add already exists, an ALREADY_EXISTS error is returned.
Parameters | |
---|---|
Name | Description |
request | AddCatalogAttributeRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
GetAttributesConfig(GetAttributesConfigRequest, CallSettings)
public override AttributesConfig GetAttributesConfig(GetAttributesConfigRequest request, CallSettings callSettings = null)
Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].
Parameters | |
---|---|
Name | Description |
request | GetAttributesConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AttributesConfig | The RPC response. |
GetAttributesConfigAsync(GetAttributesConfigRequest, CallSettings)
public override Task<AttributesConfig> GetAttributesConfigAsync(GetAttributesConfigRequest request, CallSettings callSettings = null)
Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].
Parameters | |
---|---|
Name | Description |
request | GetAttributesConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
GetCompletionConfig(GetCompletionConfigRequest, CallSettings)
public override CompletionConfig GetCompletionConfig(GetCompletionConfigRequest request, CallSettings callSettings = null)
Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].
Parameters | |
---|---|
Name | Description |
request | GetCompletionConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CompletionConfig | The RPC response. |
GetCompletionConfigAsync(GetCompletionConfigRequest, CallSettings)
public override Task<CompletionConfig> GetCompletionConfigAsync(GetCompletionConfigRequest request, CallSettings callSettings = null)
Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].
Parameters | |
---|---|
Name | Description |
request | GetCompletionConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskCompletionConfig | A Task containing the RPC response. |
GetDefaultBranch(GetDefaultBranchRequest, CallSettings)
public override GetDefaultBranchResponse GetDefaultBranch(GetDefaultBranchRequest request, CallSettings callSettings = null)
Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.
Parameters | |
---|---|
Name | Description |
request | GetDefaultBranchRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
GetDefaultBranchResponse | The RPC response. |
GetDefaultBranchAsync(GetDefaultBranchRequest, CallSettings)
public override Task<GetDefaultBranchResponse> GetDefaultBranchAsync(GetDefaultBranchRequest request, CallSettings callSettings = null)
Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.
Parameters | |
---|---|
Name | Description |
request | GetDefaultBranchRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskGetDefaultBranchResponse | A Task containing the RPC response. |
ListCatalogs(ListCatalogsRequest, CallSettings)
public override PagedEnumerable<ListCatalogsResponse, Catalog> ListCatalogs(ListCatalogsRequest request, CallSettings callSettings = null)
Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.
Parameters | |
---|---|
Name | Description |
request | ListCatalogsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListCatalogsResponseCatalog | A pageable sequence of Catalog resources. |
ListCatalogsAsync(ListCatalogsRequest, CallSettings)
public override PagedAsyncEnumerable<ListCatalogsResponse, Catalog> ListCatalogsAsync(ListCatalogsRequest request, CallSettings callSettings = null)
Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.
Parameters | |
---|---|
Name | Description |
request | ListCatalogsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListCatalogsResponseCatalog | A pageable asynchronous sequence of Catalog resources. |
RemoveCatalogAttribute(RemoveCatalogAttributeRequest, CallSettings)
public override AttributesConfig RemoveCatalogAttribute(RemoveCatalogAttributeRequest request, CallSettings callSettings = null)
Removes the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] from the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].
If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to remove does not exist, a NOT_FOUND error is returned.
Parameters | |
---|---|
Name | Description |
request | RemoveCatalogAttributeRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AttributesConfig | The RPC response. |
RemoveCatalogAttributeAsync(RemoveCatalogAttributeRequest, CallSettings)
public override Task<AttributesConfig> RemoveCatalogAttributeAsync(RemoveCatalogAttributeRequest request, CallSettings callSettings = null)
Removes the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] from the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].
If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to remove does not exist, a NOT_FOUND error is returned.
Parameters | |
---|---|
Name | Description |
request | RemoveCatalogAttributeRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
ReplaceCatalogAttribute(ReplaceCatalogAttributeRequest, CallSettings)
public override AttributesConfig ReplaceCatalogAttribute(ReplaceCatalogAttributeRequest request, CallSettings callSettings = null)
Replaces the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] in the [AttributesConfig][google.cloud.retail.v2.AttributesConfig] by updating the catalog attribute with the same [CatalogAttribute.key][google.cloud.retail.v2.CatalogAttribute.key].
If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to replace does not exist, a NOT_FOUND error is returned.
Parameters | |
---|---|
Name | Description |
request | ReplaceCatalogAttributeRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AttributesConfig | The RPC response. |
ReplaceCatalogAttributeAsync(ReplaceCatalogAttributeRequest, CallSettings)
public override Task<AttributesConfig> ReplaceCatalogAttributeAsync(ReplaceCatalogAttributeRequest request, CallSettings callSettings = null)
Replaces the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] in the [AttributesConfig][google.cloud.retail.v2.AttributesConfig] by updating the catalog attribute with the same [CatalogAttribute.key][google.cloud.retail.v2.CatalogAttribute.key].
If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to replace does not exist, a NOT_FOUND error is returned.
Parameters | |
---|---|
Name | Description |
request | ReplaceCatalogAttributeRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
SetDefaultBranch(SetDefaultBranchRequest, CallSettings)
public override void SetDefaultBranch(SetDefaultBranchRequest request, CallSettings callSettings = null)
Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.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.v2.SearchRequest.branch] to
projects/*/locations/*/catalogs/*/branches/default_branch
is equivalent
to setting
[SearchRequest.branch][google.cloud.retail.v2.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.v2.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}.
Parameters | |
---|---|
Name | Description |
request | SetDefaultBranchRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
SetDefaultBranchAsync(SetDefaultBranchRequest, CallSettings)
public override Task SetDefaultBranchAsync(SetDefaultBranchRequest request, CallSettings callSettings = null)
Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.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.v2.SearchRequest.branch] to
projects/*/locations/*/catalogs/*/branches/default_branch
is equivalent
to setting
[SearchRequest.branch][google.cloud.retail.v2.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.v2.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}.
Parameters | |
---|---|
Name | Description |
request | SetDefaultBranchRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
UpdateAttributesConfig(UpdateAttributesConfigRequest, CallSettings)
public override AttributesConfig UpdateAttributesConfig(UpdateAttributesConfigRequest request, CallSettings callSettings = null)
Updates the [AttributesConfig][google.cloud.retail.v2.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.
Parameters | |
---|---|
Name | Description |
request | UpdateAttributesConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AttributesConfig | The RPC response. |
UpdateAttributesConfigAsync(UpdateAttributesConfigRequest, CallSettings)
public override Task<AttributesConfig> UpdateAttributesConfigAsync(UpdateAttributesConfigRequest request, CallSettings callSettings = null)
Updates the [AttributesConfig][google.cloud.retail.v2.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.
Parameters | |
---|---|
Name | Description |
request | UpdateAttributesConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
UpdateCatalog(UpdateCatalogRequest, CallSettings)
public override Catalog UpdateCatalog(UpdateCatalogRequest request, CallSettings callSettings = null)
Updates the [Catalog][google.cloud.retail.v2.Catalog]s.
Parameters | |
---|---|
Name | Description |
request | UpdateCatalogRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Catalog | The RPC response. |
UpdateCatalogAsync(UpdateCatalogRequest, CallSettings)
public override Task<Catalog> UpdateCatalogAsync(UpdateCatalogRequest request, CallSettings callSettings = null)
Updates the [Catalog][google.cloud.retail.v2.Catalog]s.
Parameters | |
---|---|
Name | Description |
request | UpdateCatalogRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskCatalog | A Task containing the RPC response. |
UpdateCompletionConfig(UpdateCompletionConfigRequest, CallSettings)
public override CompletionConfig UpdateCompletionConfig(UpdateCompletionConfigRequest request, CallSettings callSettings = null)
Updates the [CompletionConfig][google.cloud.retail.v2.CompletionConfig]s.
Parameters | |
---|---|
Name | Description |
request | UpdateCompletionConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CompletionConfig | The RPC response. |
UpdateCompletionConfigAsync(UpdateCompletionConfigRequest, CallSettings)
public override Task<CompletionConfig> UpdateCompletionConfigAsync(UpdateCompletionConfigRequest request, CallSettings callSettings = null)
Updates the [CompletionConfig][google.cloud.retail.v2.CompletionConfig]s.
Parameters | |
---|---|
Name | Description |
request | UpdateCompletionConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskCompletionConfig | A Task containing the RPC response. |