public class CatalogServiceClient : ClientBase<CatalogService.CatalogServiceClient>
Client for CatalogService
Inheritance
Object > ClientBase > ClientBase<CatalogService.CatalogServiceClient> > CatalogService.CatalogServiceClientNamespace
Google.Cloud.Retail.V2Assembly
Google.Cloud.Retail.V2.dll
Constructors
CatalogServiceClient()
protected CatalogServiceClient()
Protected parameterless constructor to allow creation of test doubles.
CatalogServiceClient(CallInvoker)
public CatalogServiceClient(CallInvoker callInvoker)
Creates a new client for CatalogService that uses a custom CallInvoker
.
Parameter | |
---|---|
Name | Description |
callInvoker | CallInvoker The callInvoker to use to make remote calls. |
CatalogServiceClient(ChannelBase)
public CatalogServiceClient(ChannelBase channel)
Creates a new client for CatalogService
Parameter | |
---|---|
Name | Description |
channel | ChannelBase The channel to use to make remote calls. |
CatalogServiceClient(ClientBase.ClientBaseConfiguration)
protected CatalogServiceClient(ClientBase.ClientBaseConfiguration configuration)
Protected constructor to allow creation of configured clients.
Parameter | |
---|---|
Name | Description |
configuration | ClientBase.ClientBaseConfiguration The client configuration. |
Methods
CreateLocationsClient()
public virtual Locations.LocationsClient CreateLocationsClient()
Creates a new instance of Locations.LocationsClient using the same call invoker as this client.
Returns | |
---|---|
Type | Description |
Locations.LocationsClient | A new Locations.LocationsClient for the same target as this client. |
GetDefaultBranch(GetDefaultBranchRequest, CallOptions)
public virtual GetDefaultBranchResponse GetDefaultBranch(GetDefaultBranchRequest request, CallOptions options)
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 to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
GetDefaultBranchResponse | The response received from the server. |
GetDefaultBranch(GetDefaultBranchRequest, Metadata, Nullable<DateTime>, CancellationToken)
public virtual GetDefaultBranchResponse GetDefaultBranch(GetDefaultBranchRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
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 to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | Nullable<DateTime> An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
GetDefaultBranchResponse | The response received from the server. |
GetDefaultBranchAsync(GetDefaultBranchRequest, CallOptions)
public virtual AsyncUnaryCall<GetDefaultBranchResponse> GetDefaultBranchAsync(GetDefaultBranchRequest request, CallOptions options)
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 to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCall<GetDefaultBranchResponse> | The call object. |
GetDefaultBranchAsync(GetDefaultBranchRequest, Metadata, Nullable<DateTime>, CancellationToken)
public virtual AsyncUnaryCall<GetDefaultBranchResponse> GetDefaultBranchAsync(GetDefaultBranchRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
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 to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | Nullable<DateTime> An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCall<GetDefaultBranchResponse> | The call object. |
ListCatalogs(ListCatalogsRequest, CallOptions)
public virtual ListCatalogsResponse ListCatalogs(ListCatalogsRequest request, CallOptions options)
Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.
Parameters | |
---|---|
Name | Description |
request | ListCatalogsRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
ListCatalogsResponse | The response received from the server. |
ListCatalogs(ListCatalogsRequest, Metadata, Nullable<DateTime>, CancellationToken)
public virtual ListCatalogsResponse ListCatalogs(ListCatalogsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.
Parameters | |
---|---|
Name | Description |
request | ListCatalogsRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | Nullable<DateTime> An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
ListCatalogsResponse | The response received from the server. |
ListCatalogsAsync(ListCatalogsRequest, CallOptions)
public virtual AsyncUnaryCall<ListCatalogsResponse> ListCatalogsAsync(ListCatalogsRequest request, CallOptions options)
Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.
Parameters | |
---|---|
Name | Description |
request | ListCatalogsRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCall<ListCatalogsResponse> | The call object. |
ListCatalogsAsync(ListCatalogsRequest, Metadata, Nullable<DateTime>, CancellationToken)
public virtual AsyncUnaryCall<ListCatalogsResponse> ListCatalogsAsync(ListCatalogsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.
Parameters | |
---|---|
Name | Description |
request | ListCatalogsRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | Nullable<DateTime> An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCall<ListCatalogsResponse> | The call object. |
NewInstance(ClientBase.ClientBaseConfiguration)
protected override CatalogService.CatalogServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)
Creates a new instance of client from given ClientBaseConfiguration
.
Parameter | |
---|---|
Name | Description |
configuration | ClientBase.ClientBaseConfiguration |
Returns | |
---|---|
Type | Description |
CatalogService.CatalogServiceClient |
SetDefaultBranch(SetDefaultBranchRequest, CallOptions)
public virtual Empty SetDefaultBranch(SetDefaultBranchRequest request, CallOptions options)
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 to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
Empty | The response received from the server. |
SetDefaultBranch(SetDefaultBranchRequest, Metadata, Nullable<DateTime>, CancellationToken)
public virtual Empty SetDefaultBranch(SetDefaultBranchRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
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 to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | Nullable<DateTime> An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
Empty | The response received from the server. |
SetDefaultBranchAsync(SetDefaultBranchRequest, CallOptions)
public virtual AsyncUnaryCall<Empty> SetDefaultBranchAsync(SetDefaultBranchRequest request, CallOptions options)
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 to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCall<Empty> | The call object. |
SetDefaultBranchAsync(SetDefaultBranchRequest, Metadata, Nullable<DateTime>, CancellationToken)
public virtual AsyncUnaryCall<Empty> SetDefaultBranchAsync(SetDefaultBranchRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
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 to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | Nullable<DateTime> An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCall<Empty> | The call object. |
UpdateCatalog(UpdateCatalogRequest, CallOptions)
public virtual Catalog UpdateCatalog(UpdateCatalogRequest request, CallOptions options)
Updates the [Catalog][google.cloud.retail.v2.Catalog]s.
Parameters | |
---|---|
Name | Description |
request | UpdateCatalogRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
Catalog | The response received from the server. |
UpdateCatalog(UpdateCatalogRequest, Metadata, Nullable<DateTime>, CancellationToken)
public virtual Catalog UpdateCatalog(UpdateCatalogRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Updates the [Catalog][google.cloud.retail.v2.Catalog]s.
Parameters | |
---|---|
Name | Description |
request | UpdateCatalogRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | Nullable<DateTime> An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
Catalog | The response received from the server. |
UpdateCatalogAsync(UpdateCatalogRequest, CallOptions)
public virtual AsyncUnaryCall<Catalog> UpdateCatalogAsync(UpdateCatalogRequest request, CallOptions options)
Updates the [Catalog][google.cloud.retail.v2.Catalog]s.
Parameters | |
---|---|
Name | Description |
request | UpdateCatalogRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCall<Catalog> | The call object. |
UpdateCatalogAsync(UpdateCatalogRequest, Metadata, Nullable<DateTime>, CancellationToken)
public virtual AsyncUnaryCall<Catalog> UpdateCatalogAsync(UpdateCatalogRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Updates the [Catalog][google.cloud.retail.v2.Catalog]s.
Parameters | |
---|---|
Name | Description |
request | UpdateCatalogRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | Nullable<DateTime> An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCall<Catalog> | The call object. |