Class CatalogServiceClientImpl (1.6.0)

public sealed class CatalogServiceClientImpl : CatalogServiceClient

CatalogService client wrapper implementation, for convenient use.

Inheritance

Object > CatalogServiceClient > CatalogServiceClientImpl

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Remarks

Service for managing catalog configuration.

Constructors

CatalogServiceClientImpl(CatalogService.CatalogServiceClient, CatalogServiceSettings)

public CatalogServiceClientImpl(CatalogService.CatalogServiceClient grpcClient, CatalogServiceSettings settings)

Constructs a client wrapper for the CatalogService service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientCatalogService.CatalogServiceClient

The underlying gRPC client.

settingsCatalogServiceSettings

The base CatalogServiceSettings used within this client.

Properties

GrpcClient

public override CatalogService.CatalogServiceClient GrpcClient { get; }

The underlying gRPC CatalogService client

Property Value
TypeDescription
CatalogService.CatalogServiceClient
Overrides

Methods

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
NameDescription
requestGetDefaultBranchRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
GetDefaultBranchResponse

The RPC response.

Overrides

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
NameDescription
requestGetDefaultBranchRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<GetDefaultBranchResponse>

A Task containing the RPC response.

Overrides

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
NameDescription
requestListCatalogsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListCatalogsResponse, Catalog>

A pageable sequence of Catalog resources.

Overrides

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
NameDescription
requestListCatalogsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListCatalogsResponse, Catalog>

A pageable asynchronous sequence of Catalog resources.

Overrides

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
NameDescription
requestSetDefaultBranchRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Overrides

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
NameDescription
requestSetDefaultBranchRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Overrides

UpdateCatalog(UpdateCatalogRequest, CallSettings)

public override Catalog UpdateCatalog(UpdateCatalogRequest request, CallSettings callSettings = null)

Updates the [Catalog][google.cloud.retail.v2.Catalog]s.

Parameters
NameDescription
requestUpdateCatalogRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Catalog

The RPC response.

Overrides

UpdateCatalogAsync(UpdateCatalogRequest, CallSettings)

public override Task<Catalog> UpdateCatalogAsync(UpdateCatalogRequest request, CallSettings callSettings = null)

Updates the [Catalog][google.cloud.retail.v2.Catalog]s.

Parameters
NameDescription
requestUpdateCatalogRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Catalog>

A Task containing the RPC response.

Overrides