Retail v2 API - Class CatalogService.CatalogServiceClient (2.5.0)

public class CatalogService.CatalogServiceClient : ClientBase<CatalogService.CatalogServiceClient>

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

Client for CatalogService

Inheritance

object > ClientBase > ClientBaseCatalogServiceCatalogServiceClient > CatalogService.CatalogServiceClient

Namespace

GoogleCloudGoogle.Cloud.RetailV2

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(ClientBaseConfiguration)

protected CatalogServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration

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, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallAttributesConfig

The call object.

AddCatalogAttributeAsync(AddCatalogAttributeRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallAttributesConfig

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
LocationsLocationsClient

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, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallAttributesConfig

The call object.

GetAttributesConfigAsync(GetAttributesConfigRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallAttributesConfig

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, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallCompletionConfig

The call object.

GetCompletionConfigAsync(GetCompletionConfigRequest, Metadata, DateTime?, CancellationToken)

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

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.

deadlineDateTime

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
AsyncUnaryCallCompletionConfig

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, DateTime?, CancellationToken)

public virtual GetDefaultBranchResponse GetDefaultBranch(GetDefaultBranchRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

deadlineDateTime

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
AsyncUnaryCallGetDefaultBranchResponse

The call object.

GetDefaultBranchAsync(GetDefaultBranchRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<GetDefaultBranchResponse> GetDefaultBranchAsync(GetDefaultBranchRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

deadlineDateTime

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
AsyncUnaryCallGetDefaultBranchResponse

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, DateTime?, CancellationToken)

public virtual ListCatalogsResponse ListCatalogs(ListCatalogsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

deadlineDateTime

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
AsyncUnaryCallListCatalogsResponse

The call object.

ListCatalogsAsync(ListCatalogsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListCatalogsResponse> ListCatalogsAsync(ListCatalogsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

deadlineDateTime

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
AsyncUnaryCallListCatalogsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override CatalogService.CatalogServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBaseClientBaseConfiguration
Returns
TypeDescription
CatalogServiceCatalogServiceClient
Overrides

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.

Paramet