Retail v2 API - Class ServingConfigService.ServingConfigServiceClient (2.4.0)

public class ServingConfigServiceClient : ClientBase<ServingConfigService.ServingConfigServiceClient>

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

Client for ServingConfigService

Inheritance

Object > ClientBase > ClientBase<ServingConfigService.ServingConfigServiceClient> > 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
NameDescription
callInvokerCallInvoker

The callInvoker to use to make remote calls.

ServingConfigServiceClient(ChannelBase)

public ServingConfigServiceClient(ChannelBase channel)

Creates a new client for ServingConfigService

Parameter
NameDescription
channelChannelBase

The channel to use to make remote calls.

ServingConfigServiceClient(ClientBase.ClientBaseConfiguration)

protected ServingConfigServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ServingConfig

The response received from the server.

AddControl(AddControlRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ServingConfig>

The call object.

AddControlAsync(AddControlRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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

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

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.

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ServingConfig

The response received from the server.

CreateServingConfig(CreateServingConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ServingConfig>

The call object.

CreateServingConfigAsync(CreateServingConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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

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

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
Empty

The response received from the server.

DeleteServingConfig(DeleteServingConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Deletes a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
NameDescription
requestDeleteServingConfigRequest

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.

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<Empty>

The call object.

DeleteServingConfigAsync(DeleteServingConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Deletes a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
NameDescription
requestDeleteServingConfigRequest

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.

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ServingConfig

The response received from the server.

GetServingConfig(GetServingConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Gets a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
NameDescription
requestGetServingConfigRequest

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ServingConfig>

The call object.

GetServingConfigAsync(GetServingConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Gets a ServingConfig.

Returns a NotFound error if the ServingConfig does not exist.

Parameters
NameDescription
requestGetServingConfigRequest

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

The call object.

ListServingConfigs(ListServingConfigsRequest, CallOptions)

public virtual ListServingConfigsResponse ListServingConfigs(ListServingConfigsRequest request, CallOptions options)

Lists all ServingConfigs linked to this catalog.

Parameters
NameDescription
requestListServingConfigsRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ListServingConfigsResponse

The response received from the server.

ListServingConfigs(ListServingConfigsRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Lists all ServingConfigs linked to this catalog.

Parameters
NameDescription
requestListServingConfigsRequest

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ListServingConfigsResponse>

The call object.

ListServingConfigsAsync(ListServingConfigsRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Lists all ServingConfigs linked to this catalog.

Parameters
NameDescription
requestListServingConfigsRequest

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

The call object.

NewInstance(ClientBase.ClientBaseConfiguration)

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

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
NameDescription
configurationClientBase.ClientBaseConfiguration
Returns
TypeDescription
ServingConfigService.ServingConfigServiceClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Retail.V2.ServingConfigService.ServingConfigServiceClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ServingConfig

The response received from the server.

RemoveControl(RemoveControlRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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

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

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ServingConfig>

The call object.

RemoveControlAsync(RemoveControlRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

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

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

The call object.

UpdateServingConfig(UpdateServingConfigRequest, CallOptions)

public virtual ServingConfig UpdateServingConfig(UpdateServingConfigRequest request, CallOptions options)

Updates a ServingConfig.

Parameters
NameDescription
requestUpdateServingConfigRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
ServingConfig

The response received from the server.

UpdateServingConfig(UpdateServingConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Updates a ServingConfig.

Parameters
NameDescription
requestUpdateServingConfigRequest

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
ServingConfig

The response received from the server.

UpdateServingConfigAsync(UpdateServingConfigRequest, CallOptions)

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

Updates a ServingConfig.

Parameters
NameDescription
requestUpdateServingConfigRequest

The request to send to the server.

optionsCallOptions

The options for the call.

Returns
TypeDescription
AsyncUnaryCall<ServingConfig>

The call object.

UpdateServingConfigAsync(UpdateServingConfigRequest, Metadata, Nullable<DateTime>, CancellationToken)

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

Updates a ServingConfig.

Parameters
NameDescription
requestUpdateServingConfigRequest

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

The call object.