Retail v2 API - Class CatalogService.CatalogServiceClient (2.3.0)

public class CatalogServiceClient : ClientBase<CatalogService.CatalogServiceClient>

Reference documentation and code samples for the Retail v2 API class CatalogService.CatalogServiceClient.

Client for CatalogService

Inheritance

Object > ClientBase > ClientBase<CatalogService.CatalogServiceClient> > CatalogService.CatalogServiceClient

Namespace

Google.Cloud.Retail.V2

Assembly

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

The callInvoker to use to make remote calls.

CatalogServiceClient(ChannelBase)

public CatalogServiceClient(ChannelBase channel)

Creates a new client for CatalogService

Parameter
NameDescription
channelChannelBase

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
NameDescription
configurationClientBase.ClientBaseConfiguration

The client configuration.

Methods

AddCatalogAttribute(AddCatalogAttributeRequest, CallOptions)

public virtual AttributesConfig AddCatalogAttribute(AddCatalogAttributeRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AttributesConfig

The response received from the server.

AddCatalogAttribute(AddCatalogAttributeRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AttributesConfig AddCatalogAttribute(AddCatalogAttributeRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AttributesConfig

The response received from the server.

AddCatalogAttributeAsync(AddCatalogAttributeRequest, CallOptions)

public virtual AsyncUnaryCall<AttributesConfig> AddCatalogAttributeAsync(AddCatalogAttributeRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<AttributesConfig>

The call object.

AddCatalogAttributeAsync(AddCatalogAttributeRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<AttributesConfig> AddCatalogAttributeAsync(AddCatalogAttributeRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<AttributesConfig>

The call object.

CreateLocationsClient()

public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of Locations.LocationsClient using the same call invoker as this client.

Returns
TypeDescription
Locations.LocationsClient

A new Locations.LocationsClient for the same target as this client.

GetAttributesConfig(GetAttributesConfigRequest, CallOptions)

public virtual AttributesConfig GetAttributesConfig(GetAttributesConfigRequest request, CallOptions options)

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
requestGetAttributesConfigRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AttributesConfig

The response received from the server.

GetAttributesConfig(GetAttributesConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AttributesConfig GetAttributesConfig(GetAttributesConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
requestGetAttributesConfigRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AttributesConfig

The response received from the server.

GetAttributesConfigAsync(GetAttributesConfigRequest, CallOptions)

public virtual AsyncUnaryCall<AttributesConfig> GetAttributesConfigAsync(GetAttributesConfigRequest request, CallOptions options)

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
requestGetAttributesConfigRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<AttributesConfig>

The call object.

GetAttributesConfigAsync(GetAttributesConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<AttributesConfig> GetAttributesConfigAsync(GetAttributesConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
requestGetAttributesConfigRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<AttributesConfig>

The call object.

GetCompletionConfig(GetCompletionConfigRequest, CallOptions)

public virtual CompletionConfig GetCompletionConfig(GetCompletionConfigRequest request, CallOptions options)

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
requestGetCompletionConfigRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CompletionConfig

The response received from the server.

GetCompletionConfig(GetCompletionConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual CompletionConfig GetCompletionConfig(GetCompletionConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
requestGetCompletionConfigRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CompletionConfig

The response received from the server.

GetCompletionConfigAsync(GetCompletionConfigRequest, CallOptions)

public virtual AsyncUnaryCall<CompletionConfig> GetCompletionConfigAsync(GetCompletionConfigRequest request, CallOptions options)

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
requestGetCompletionConfigRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<CompletionConfig>

The call object.

GetCompletionConfigAsync(GetCompletionConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<CompletionConfig> GetCompletionConfigAsync(GetCompletionConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
requestGetCompletionConfigRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<CompletionConfig>

The call object.

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

The request to send to the server.

optionsCallOptions

The options for the call.

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

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

The request to send to the server.

optionsCallOptions

The options for the call.

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

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

The request to send to the server.

optionsCallOptions

The options for the call.

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

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

The request to send to the server.

optionsCallOptions

The options for the call.

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
CatalogService.CatalogServiceClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Retail.V2.CatalogService.CatalogServiceClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

RemoveCatalogAttribute(RemoveCatalogAttributeRequest, CallOptions)

public virtual AttributesConfig RemoveCatalogAttribute(RemoveCatalogAttributeRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AttributesConfig

The response received from the server.

RemoveCatalogAttribute(RemoveCatalogAttributeRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AttributesConfig RemoveCatalogAttribute(RemoveCatalogAttributeRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AttributesConfig

The response received from the server.

RemoveCatalogAttributeAsync(RemoveCatalogAttributeRequest, CallOptions)

public virtual AsyncUnaryCall<AttributesConfig> RemoveCatalogAttributeAsync(RemoveCatalogAttributeRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<AttributesConfig>

The call object.

RemoveCatalogAttributeAsync(RemoveCatalogAttributeRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<AttributesConfig> RemoveCatalogAttributeAsync(RemoveCatalogAttributeRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<AttributesConfig>

The call object.

ReplaceCatalogAttribute(ReplaceCatalogAttributeRequest, CallOptions)

public virtual AttributesConfig ReplaceCatalogAttribute(ReplaceCatalogAttributeRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AttributesConfig

The response received from the server.

ReplaceCatalogAttribute(ReplaceCatalogAttributeRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AttributesConfig ReplaceCatalogAttribute(ReplaceCatalogAttributeRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AttributesConfig

The response received from the server.

ReplaceCatalogAttributeAsync(ReplaceCatalogAttributeRequest, CallOptions)

public virtual AsyncUnaryCall<AttributesConfig> ReplaceCatalogAttributeAsync(ReplaceCatalogAttributeRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<AttributesConfig>

The call object.

ReplaceCatalogAttributeAsync(ReplaceCatalogAttributeRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<AttributesConfig> ReplaceCatalogAttributeAsync(ReplaceCatalogAttributeRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<AttributesConfig>

The call object.

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

The request to send to the server.

optionsCallOptions

The options for the call.

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

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

The request to send to the server.

optionsCallOptions

The options for the call.

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Empty>

The call object.

UpdateAttributesConfig(UpdateAttributesConfigRequest, CallOptions)

public virtual AttributesConfig UpdateAttributesConfig(UpdateAttributesConfigRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AttributesConfig

The response received from the server.

UpdateAttributesConfig(UpdateAttributesConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AttributesConfig UpdateAttributesConfig(UpdateAttributesConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AttributesConfig

The response received from the server.

UpdateAttributesConfigAsync(UpdateAttributesConfigRequest, CallOptions)

public virtual AsyncUnaryCall<AttributesConfig> UpdateAttributesConfigAsync(UpdateAttributesConfigRequest request, CallOptions options)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<AttributesConfig>

The call object.

UpdateAttributesConfigAsync(UpdateAttributesConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<AttributesConfig> UpdateAttributesConfigAsync(UpdateAttributesConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<AttributesConfig>

The call object.

UpdateCatalog(UpdateCatalogRequest, CallOptions)

public virtual Catalog UpdateCatalog(UpdateCatalogRequest request, CallOptions options)

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

Parameters
NameDescription
requestUpdateCatalogRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestUpdateCatalogRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
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
NameDescription
requestUpdateCatalogRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
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
NameDescription
requestUpdateCatalogRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<Catalog>

The call object.

UpdateCompletionConfig(UpdateCompletionConfigRequest, CallOptions)

public virtual CompletionConfig UpdateCompletionConfig(UpdateCompletionConfigRequest request, CallOptions options)

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

Parameters
NameDescription
requestUpdateCompletionConfigRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
CompletionConfig

The response received from the server.

UpdateCompletionConfig(UpdateCompletionConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual CompletionConfig UpdateCompletionConfig(UpdateCompletionConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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

Parameters
NameDescription
requestUpdateCompletionConfigRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
CompletionConfig

The response received from the server.

UpdateCompletionConfigAsync(UpdateCompletionConfigRequest, CallOptions)

public virtual AsyncUnaryCall<CompletionConfig> UpdateCompletionConfigAsync(UpdateCompletionConfigRequest request, CallOptions options)

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

Parameters
NameDescription
requestUpdateCompletionConfigRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<CompletionConfig>

The call object.

UpdateCompletionConfigAsync(UpdateCompletionConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

public virtual AsyncUnaryCall<CompletionConfig> UpdateCompletionConfigAsync(UpdateCompletionConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))

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

Parameters
NameDescription
requestUpdateCompletionConfigRequest

The request to send to the server.

headersMetadata

The initial metadata to send with the call. This parameter is optional.

deadlineNullable<DateTime>

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationTokenCancellationToken

An optional token for canceling the call.

Returns
TypeDescription
AsyncUnaryCall<CompletionConfig>

The call object.