Retail v2 API - Class ServingConfigService.ServingConfigServiceClient (2.8.0)

public class ServingConfigService.ServingConfigServiceClient : ClientBase<ServingConfigService.ServingConfigServiceClient>

Reference documentation and code samples for the Retail v2 API class ServingConfigService.ServingConfigServiceClient.

Client for ServingConfigService

Inheritance

object > ClientBase > ClientBaseServingConfigServiceServingConfigServiceClient > ServingConfigService.ServingConfigServiceClient

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Constructors

ServingConfigServiceClient()

protected ServingConfigServiceClient()

Protected parameterless constructor to allow creation of test doubles.

ServingConfigServiceClient(CallInvoker)

public ServingConfigServiceClient(CallInvoker callInvoker)

Creates a new client for ServingConfigService that uses a custom CallInvoker.

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

ServingConfigServiceClient(ChannelBase)

public ServingConfigServiceClient(ChannelBase channel)

Creates a new client for ServingConfigService

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

ServingConfigServiceClient(ClientBaseConfiguration)

protected ServingConfigServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

AddControl(AddControlRequest, CallOptions)

public virtual ServingConfig AddControl(AddControlRequest request, CallOptions options)

Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.

Parameters
Name Description
request AddControlRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ServingConfig

The response received from the server.

AddControl(AddControlRequest, Metadata, DateTime?, CancellationToken)

public virtual ServingConfig AddControl(AddControlRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.

Parameters
Name Description
request AddControlRequest

The request to send to the server.

headers Metadata

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

deadline 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
ServingConfig

The response received from the server.

AddControlAsync(AddControlRequest, CallOptions)

public virtual AsyncUnaryCall<ServingConfig> AddControlAsync(AddControlRequest request, CallOptions options)

Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.

Parameters
Name Description
request AddControlRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallServingConfig

The call object.

AddControlAsync(AddControlRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ServingConfig> AddControlAsync(AddControlRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.

Parameters
Name Description
request AddControlRequest

The request to send to the server.

headers Metadata

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

deadline 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
AsyncUnaryCallServingConfig

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
Type Description
LocationsLocationsClient

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

CreateServingConfig(CreateServingConfigRequest, CallOptions)

public virtual ServingConfig CreateServingConfig(CreateServingConfigRequest request, CallOptions options)

Creates a ServingConfig.

A maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are allowed in a [Catalog][google.cloud.retail.v2.Catalog], otherwise a FAILED_PRECONDITION error is returned.

Parameters
Name Description
request CreateServingConfigRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ServingConfig

The response received from the server.

CreateServingConfig(CreateServingConfigRequest, Metadata, DateTime?, CancellationToken)

public virtual ServingConfig CreateServingConfig(CreateServingConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a ServingConfig.

A maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are allowed in a [Catalog][google.cloud.retail.v2.Catalog], otherwise a FAILED_PRECONDITION error is returned.

Parameters
Name Description
request CreateServingConfigRequest

The request to send to the server.

headers Metadata

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

deadline 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
ServingConfig

The response received from the server.

CreateServingConfigAsync(CreateServingConfigRequest, CallOptions)

public virtual AsyncUnaryCall<ServingConfig> CreateServingConfigAsync(CreateServingConfigRequest request, CallOptions options)

Creates a ServingConfig.

A maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are allowed in a [Catalog][google.cloud.retail.v2.Catalog], otherwise a FAILED_PRECONDITION error is returned.

Parameters
Name Description
request CreateServingConfigRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallServingConfig

The call object.

CreateServingConfigAsync(CreateServingConfigRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ServingConfig> CreateServingConfigAsync(CreateServingConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a ServingConfig.

A maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are allowed in a [Catalog][google.cloud.retail.v2.Catalog], otherwise a FAILED_PRECONDITION error is returned.

Parameters
Name Description
request CreateServingConfigRequest

The request to send to the server.

headers Metadata

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

deadline 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
AsyncUnaryCallServingConfig

The call object.

DeleteServingConfig(DeleteServingConfigRequest, CallOptions)

public virtual Empty DeleteServingConfig(DeleteServingConfigRequest request, CallOptions options)

Deletes a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
Name Description
request DeleteServingConfigRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Empty

The response received from the server.

DeleteServingConfig(DeleteServingConfigRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteServingConfig(DeleteServingConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
Name Description
request DeleteServingConfigRequest

The request to send to the server.

headers Metadata

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

deadline 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.

DeleteServingConfigAsync(DeleteServingConfigRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteServingConfigAsync(DeleteServingConfigRequest request, CallOptions options)

Deletes a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
Name Description
request DeleteServingConfigRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

DeleteServingConfigAsync(DeleteServingConfigRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteServingConfigAsync(DeleteServingConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
Name Description
request DeleteServingConfigRequest

The request to send to the server.

headers Metadata

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

deadline 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
AsyncUnaryCallEmpty

The call object.

GetServingConfig(GetServingConfigRequest, CallOptions)

public virtual ServingConfig GetServingConfig(GetServingConfigRequest request, CallOptions options)

Gets a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
Name Description
request GetServingConfigRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ServingConfig

The response received from the server.

GetServingConfig(GetServingConfigRequest, Metadata, DateTime?, CancellationToken)

public virtual ServingConfig GetServingConfig(GetServingConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
Name Description
request GetServingConfigRequest

The request to send to the server.

headers Metadata

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

deadline 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
ServingConfig

The response received from the server.

GetServingConfigAsync(GetServingConfigRequest, CallOptions)

public virtual AsyncUnaryCall<ServingConfig> GetServingConfigAsync(GetServingConfigRequest request, CallOptions options)

Gets a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
Name Description
request GetServingConfigRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallServingConfig

The call object.

GetServingConfigAsync(GetServingConfigRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ServingConfig> GetServingConfigAsync(GetServingConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
Name Description
request GetServingConfigRequest

The request to send to the server.

headers Metadata

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

deadline 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
AsyncUnaryCallServingConfig

The call object.

ListServingConfigs(ListServingConfigsRequest, CallOptions)

public virtual ListServingConfigsResponse ListServingConfigs(ListServingConfigsRequest request, CallOptions options)

Lists all ServingConfigs linked to this catalog.

Parameters
Name Description
request ListServingConfigsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ListServingConfigsResponse

The response received from the server.

ListServingConfigs(ListServingConfigsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListServingConfigsResponse ListServingConfigs(ListServingConfigsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists all ServingConfigs linked to this catalog.

Parameters
Name Description
request ListServingConfigsRequest

The request to send to the server.

headers Metadata

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

deadline 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
ListServingConfigsResponse

The response received from the server.

ListServingConfigsAsync(ListServingConfigsRequest, CallOptions)

public virtual AsyncUnaryCall<ListServingConfigsResponse> ListServingConfigsAsync(ListServingConfigsRequest request, CallOptions options)

Lists all ServingConfigs linked to this catalog.

Parameters
Name Description
request ListServingConfigsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallListServingConfigsResponse

The call object.

ListServingConfigsAsync(ListServingConfigsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListServingConfigsResponse> ListServingConfigsAsync(ListServingConfigsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists all ServingConfigs linked to this catalog.

Parameters
Name Description
request ListServingConfigsRequest

The request to send to the server.

headers Metadata

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

deadline 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
AsyncUnaryCallListServingConfigsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override ServingConfigService.ServingConfigServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
ServingConfigServiceServingConfigServiceClient
Overrides

RemoveControl(RemoveControlRequest, CallOptions)

public virtual ServingConfig RemoveControl(RemoveControlRequest request, CallOptions options)

Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.

Parameters
Name Description
request RemoveControlRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ServingConfig

The response received from the server.

RemoveControl(RemoveControlRequest, Metadata, DateTime?, CancellationToken)

public virtual ServingConfig RemoveControl(RemoveControlRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.

Parameters
Name Description
request RemoveControlRequest

The request to send to the server.

headers Metadata

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

deadline 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
ServingConfig

The response received from the server.

RemoveControlAsync(RemoveControlRequest, CallOptions)

public virtual AsyncUnaryCall<ServingConfig> RemoveControlAsync(RemoveControlRequest request, CallOptions options)

Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.

Parameters
Name Description
request RemoveControlRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallServingConfig

The call object.

RemoveControlAsync(RemoveControlRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ServingConfig> RemoveControlAsync(RemoveControlRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.

Parameters
Name Description
request RemoveControlRequest

The request to send to the server.

headers Metadata

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

deadline 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
AsyncUnaryCallServingConfig

The call object.

UpdateServingConfig(UpdateServingConfigRequest, CallOptions)

public virtual ServingConfig UpdateServingConfig(UpdateServingConfigRequest request, CallOptions options)

Updates a ServingConfig.

Parameters
Name Description
request UpdateServingConfigRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ServingConfig

The response received from the server.

UpdateServingConfig(UpdateServingConfigRequest, Metadata, DateTime?, CancellationToken)

public virtual ServingConfig UpdateServingConfig(UpdateServingConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a ServingConfig.

Parameters
Name Description
request UpdateServingConfigRequest

The request to send to the server.

headers Metadata

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

deadline 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
ServingConfig

The response received from the server.

UpdateServingConfigAsync(UpdateServingConfigRequest, CallOptions)

public virtual AsyncUnaryCall<ServingConfig> UpdateServingConfigAsync(UpdateServingConfigRequest request, CallOptions options)

Updates a ServingConfig.

Parameters
Name Description
request UpdateServingConfigRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallServingConfig

The call object.

UpdateServingConfigAsync(UpdateServingConfigRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ServingConfig> UpdateServingConfigAsync(UpdateServingConfigRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a ServingConfig.

Parameters
Name Description
request UpdateServingConfigRequest

The request to send to the server.

headers Metadata

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

deadline 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
AsyncUnaryCallServingConfig

The call object.